Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #2789
Closed
Open
Issue created Jul 14, 2017 by Administrator@rootContributor

XSS (or parse error) in `react-error-overlay` with specific coding style

Created by: ccloli

Is this a bug report?

Yes

Can you also reproduce the problem with npm 4.x?

Reproduced on 5.0.3 and 4.6.1

Environment

  1. node -v: v8.1.3
  2. npm -v: 5.0.3 and 4.6.1
  3. yarn --version (if you use Yarn):
  4. npm ls react-scripts (if you haven’t ejected): react-scripts@1.0.10

Then, specify:

  1. Operating system: Microsoft Windows 7 Professional x64 (6.1.7601)
  2. Browser and version (if relevant): Google Chrome 59.0.3071.115 x64 (Stable)

Steps to Reproduce

  1. create-react-app xss-test, then cd xss-test
  2. Copy the files below and paste them to overwrite the files
  3. npm start and open localhost:3000
  4. Click any checkbox that are showing on page
  5. An error dialog will shown, click the checkbox that shown on the source code panel
  6. A dialog says /XSS/ will shown

Expected Behavior

It shouldn't show the checkbox, it should display the source code. image

Actual Behavior

It shows the checkbox and the eval JavaScript of onclick attribute executed after clicked it. image image

Reproducible Demo

https://github.com/ccloli/create-react-app-xss-example

Assignee
Assign to
Time tracking