-
-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Snyk reports high risk severity for acorn in react-scripts #8615
Comments
I also have the same issue |
As do I! Feeling less lonely now |
I also have this issue. |
@SirMauri any results? |
Setting resolutions in package.json is the better approach if using yarn as you don’t explicitly set a dependency on acorn in your project. |
@bpedersen thanks for the recommendation, this clears the warnings in yarn audit.
|
Adding the resolution worked. I came across this issue while working on a very small project using create-react-app. I'm pretty new to coding but I couldn't find a way to address this with npm. I just switched over to yarn but I'm still curious, what can be done about this in projects set up with node package manager? |
It may remove the warning to manually set the resolution, but does it affect anything in the Create React App in any way? Like, any functionality? |
I haven't noticed any build issues with the patched acorn. |
@dusty |
Are there fix for this ? |
Any fix for npm? I've found 17 moderate severity vulnerabilities related to react-scripts using acorn. |
This needs to be fixed asap because it affect developers using create-react-app. |
resolution worked for me |
Running npm, I was able to fix it temporarily by and adding to package.json waiting for react-scripts update though. |
For others attempting this fix, please be mindful of your other dependencies that uses acorn. shrugs, guess I'll have to wait on actual fixes. |
Solved it temporary by using npm-audit-resolver |
Any updates ? |
did not work for me. any updates on the fix? |
same here :
any updates ? |
Same here,
any updates ? |
Update to jest v25.1.0 required in order to fix that vulnerability. It has some breaking changes, so I don't know if that's doable. |
Well, I had taken the resolutions route but just removed the resolutions from my package.json and ran |
I don't know if is a fix. I did the yarn audit.
But, as is show, it doesn't fix, just show that is deprecated, but not upgrade or anything. Actually, I don't know what yarn did to show 0 vulnerabilities... But when I did "npm i", in my "package-lock.json" has been change, in jsdom, the version of acorn from 6.4.1 (has no issues) to 5.7.4, that has the main problem (vulnerability issue). But still with 0 vulnerabilities, even with acorn 5.7.4 ¯_(ツ)_/¯ |
Acorn 5, 6 and 7 have all had patch releases fixing it, so this shouldn't be an issue anymore |
I deleted the node_modules folder, the lock files (npm and yarn) and I did: And everything is ok, 0 vulnerabilities To finish, yarn start and is working fine. I think it can be close this issue. |
New patch worked for me! Ran an |
Issue confirmed fixed after deleting package-lock.json, deleting node_modules, running npm install and then npm audit fix again. Also reran Snyk test and no more acorn vulnerabilities. |
Describe the bug
Snyk reports high severity issue with react-scripts. See details below:
Regular Expression Denial of Service (ReDoS)
Detailed paths
…and 14 more
Overview
acorn is a tiny, fast JavaScript parser written in JavaScript.
Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via a regex in the form of /[x-\ud800]/u, which causes the parser to enter an infinite loop.
This string is not a valid UTF16 and is therefore not sanitized before reaching the parser. An application which processes untrusted input and passes it directly to acorn, will allow attackers to leverage the vulnerability leading to a Denial of Service.
Did you try recovering your dependencies?
Yes.
Please paste the output of
npm --version
and/oryarn --version
to confirm.6.13.7
Which terms did you search for in User Guide?
Not applicable.
Environment
Environment Info:
System:
OS: Windows 7 6.1.7601
CPU: (8) x64 Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
Binaries:
Node: 12.16.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.21.1 - C:\Program Files (x86)\Yarn x\bin\yarn.CMD
npm: 6.13.7 - C:\Program Files\nodejs\npm.CMD
Browsers:
Internet Explorer: 11.0.9600.19301
npmPackages:
react: ^16.13.0 => 16.13.0
react-dom: ^16.13.0 => 16.13.0
react-scripts: 3.4.0 => 3.4.0
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
Install new version of React.
(Write your steps here:)
The text was updated successfully, but these errors were encountered: