Closed sonikamah closed 4 years ago
Any updates on how much time this will take?
Any updates on how much time this will take?
not yet ... any other alternative solution do you have, as build is getting failed ?
I have usually fixed this issue by deleting the package-lock.json
or yarn.lock
and then running npm install
or yarn
(depending on which one you use).
I have usually fixed this issue by deleting the
package-lock.json
oryarn.lock
and then runningnpm install
oryarn
(depending on which one you use).
Thanks for your input. have tried deleting package.json but no luck.
It should be enough to update webpack-dev-server to the latest version 3.11.0 in react-scripts. This is already done in master branch, so we just need a new release of react-scripts
It should be enough to update webpack-dev-server to the latest version 3.11.0 in react-scripts. This is already done in master branch, so we just need a new release of react-scripts
Hope it is soon.
It should be enough to update webpack-dev-server to the latest version 3.11.0 in react-scripts. This is already done in master branch, so we just need a new release of react-scripts
Hope it is soon.
any luck ?
See also: #8529, #8970, #8975.
This appears to be happening even when "react-scripts": "^3.4.0"
or "react-scripts: "3.4.1"
is used. On version 3.4.1, npm ls
gives the following output:
└─┬ react-scripts@3.4.1
[ snipped for brevity ]
├─┬ webpack-dev-server@3.10.3
Looks like the package.json file on npm needs an update or something, as it's already been addressed here: https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/package.json#L82
Anyone managed to solved this?
Any news about the update? Is a newer version of react-scripts > 3.4.1
fixing this warning going to be released soon? Thanks!
Also confirming I am seeing this issue. I ran into it when I had to do a npm install to read my created .env file. After the npm install, react-scripts": "3.3.1" wasn't loading with npm start. After reading here: https://stackoverflow.com/questions/60234640/typeerror-err-invalid-arg-type-the-path-argument-must-be-of-type-string-re
Upgrading the version made it work again, but this makes me and my team uneasy.
And now I'm seeing this same issue as the op... I love react, but please don't let it become unstable or it will be a hard sell to my team. I'm also hoping to get the next update to make the warning go away.
Almost month around when this was fixed in dependent webpack-dev-server
package (https://github.com/webpack/webpack-dev-server/releases/tag/v3.11.0) and still no one has taken 5 minutes to bump the version of it in CRA? Looks like there is not enough pissed off dev-ops around the globe who are angry at failing pipelines because of npm audit
or yarn audit
. :D
Hi @iansu do you want to take credit for closing 4 issues in create-react-app? You would have to release master for this. Or are there any blockers? It would help us a lot. And if you will ever be in Berlin I invite you to a beer ;) Deal?
Hi there,
Wondering if anyone knows the plan around resolving this issue?
The commit is merged to master to fix this issue but there hasn't been a new release since March 20, 2020. Is anyone able to give a time frame for when a new release will be out?
This issue has a lot of complaints and is a problem for a lot of people who depend on this package. it blocks our application from being deployed to our production systems. The fix is known and has been made a long time ago. The day it was made it should have been released. Security-related item must be prioritized over any other fixes. Please make the release now and prove that you're good maintainers of your product.
This has been open for far too long now. I expect a release ASAP to fix this issue once and for all, or at least some response from the devs.
Hi,
the vulnerable code in yargs-parser is not actually used in CRA context. But all the security related things are taken very seriously and webpack-dev-server was already updated in https://github.com/facebook/create-react-app/pull/8975 and will be released in 4.0.0.
See and comment https://github.com/facebook/create-react-app/discussions/9131 on how to help with 4.0.0. crossing the finish line :)
I hope you are not expecting users to update to 4.0.0, which could break many other things, to fix a security warning. This should be a minor update.
I am also seeing this warning (from today only), please help if you have any update or solution.
-And I have reinstalled the npm packages and other steps given in this forum, but warning doesn't go away.
You can resolve this by updating you package-lock.json file
Update yargs-parser 11.1 to 13.1.2 in all instances.
Also in that file, anywhere that you find yargs-parser been included with a version and a registry link, update it to the 13.1.2 using the details below
"version": "13.1.2",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
"integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
This is how I resolve this in our CI/CD pipeline
Thanks @andrewsteadcc , these steps have removed the warning.
Thanks ... this hack worked for me as well .. Thanku soo much ...
On Thu, 25 Jun 2020 at 4:39 PM, Mamta notifications@github.com wrote:
Thanks @andrewsteadcc https://github.com/andrewsteadcc , these steps have removed the warning.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/facebook/create-react-app/issues/9033#issuecomment-649472682, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBK5CGQJXXR7T2WJEJDSNDRYMV5TANCNFSM4NFDKVZA .
-- Sent from I phone
An absolute bunch of BALONEY that it's been 50 days and we can't get a minor update to fix a vulnerability.
Truee ....
On Thu, 9 Jul 2020 at 1:16 AM, shawn notifications@github.com wrote:
An absolute bunch of BALONEY that it's been 50 days and we can't get a minor update to fix a vulnerability.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/facebook/create-react-app/issues/9033#issuecomment-655719392, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBK5CC5V7KQGTPCCX6MZ5LR2TEKJANCNFSM4NFDKVZA .
-- Sent from I phone
2 months for a vulnerability fix is ridiculous.
this seems to be fixed already but is not available on npm repos. The web-dev-server is already implementing yargs": "^13.3.2" https://github.com/webpack/webpack-dev-server/issues/2612
and react-script is already implementing last version of web-dev-server "3.11.0" https://github.com/facebook/create-react-app/pull/8975 https://github.com/facebook/create-react-app/issues/8970
What i don't understand is the "not yet released". Anyone could give more information about this?
thanks
@calderaax That is the golden question, my friend. Only the CRA team can give us more information on why they are choosing not to create a minor release. Currently, their plan is to wait until 4.0.0 is ready.
We've updated webpack-dev-server to the latest version in preparation for the 4.0 release. This should be fixed in that release.
My product manager kicks me in the ass if I close a ticket which is not really resolved.
For any onlookers confused, here's the sequence of events as I'm able to trace it:
create-react-app
v3.4.0 was released.yargs-parser
versions <=13.1.2, 14.0.0 - 15.0.0, 16.0.0 - 18.1.0 was disclosed on March 16th, 2020 by Snyk Security Team on their website.create-react-app
v3.4.0 as yargs-parser
is a dependency of yargs
, a dependency of webpack-dev-server
, a dependency of react-scripts
, which is a dependency of create-react-app
.create-react-app
v3.4.1 was released.yargs-parser
was disclosed publicly to create-react-app
maintainers.webpack-dev-server
was fixed by upgrading its yargs
dependency to a later version 13.3.2.react-scripts
was fixed by upgrading its webpack-dev-server
dependency to the newly released version 3.11.0. The fix was merged into the master branch, but a new release for version 3.4.2 was not tagged to trigger the fix automatically for users.create-react-app
maintainers have indicated a preference for proceeding with including the fix in version 4 over of tagging a new minor or patch release for version 3.tl;dr A tagged release for 3.4.2 to include the fix for this issue was never made by maintainers.
I am a bit shocked that (1) this issue has been closed, (2) the create-react-app maintainers will expect people to do a major version upgrade to fix a security vulnerability that can be easily addressed with a simple npm dependency bump and a point release.
If version 4.0 was already released and the issue fixed in that version, I would still expect a 3.4.x version bump for people on that version who aren't ready to upgrade.
It's what other packages do 🤷♂️.
Why doesn't react-scripts
depend on webpack-dev-server
using the caret ^
in the dependency version, e.g. webpack-dev-server: "^3.10.3"
, this would be enough and when we run npm update
things will fix themselves.
The current published react-scripts
depends on "webpack-dev-server": "3.10.3",
, i.e. strictly version 3.10.3
: https://unpkg.com/react-scripts@3.4.1/package.json
For those using yarn
, a workaround might be to add a Selective dependency resolution. This can be done by adding the following to your package.json
:
"resolutions": {
"react-scripts/webpack-dev-server": "^3.10.3"
},
and then re-running yarn install
.
When doing this locally I also needed to add SKIP_PREFLIGHT_CHECK=true
to my .env
. I consider this issue a major bug in create-react-app
, and believe it should be re-opened.
To be clear, the vulnerability has no actual effect on CRA apps. The description says it’s for a DDOS attack which is completely irrelevant because CRA doesn’t use WDS for production environments. (It doesn’t even have a production web server.)
While I agree that ideally a release should be cut to satisfy people affected by enterprise requirements, we are looking at a case of an overzealous audit checker, not an actual vulnerability that affects your apps.
Hey all, I'd like to apologize for the delay here. We really dropped the ball on this, and I'm sorry for the frustration it caused. I've just cut react-scripts@3.4.2
which bumps us to webpack-dev-server@3.11.0
with the fix.
Again, I need to be clear that there was no actual vulnerability here at any point in time. It is unfortunate that in the JavaScript ecosystem, "audits" have an extremely low signal-noise ratio, and especially with the build tooling, very rarely reveal actual issues. If this were an actual vulnerability we'd definitely have prioritized cutting a patch on the same day. That said, I totally recognize that this is not an argument you can use in an enterprise deployment situation.
As @tkw1536 notes, Yarn has a feature called "resolutions" which lets you override transitive dependencies. I strongly recommend to use it whenever you have a problem like this which hasn't been addressed soon enough (for which, as I said earlier, I'm sorry).
To prevent this from happening again, I'm adding a dedicated reporting mechanism for security issues (https://github.com/facebook/create-react-app/commit/5e41ca016c1a650774b1e04d126a12ca93743c30) to this repo. We're not watching every thread and CRA is largely community-maintained, so please don't hesitate to escalate an issue to Facebook directly through that URL if it is an urgent security matter. Thank you!
Thanks very much for addressing this @gaearon!
There appears to be another broken dependency. serialize-javascript 2.1.2 is being used by react-scripts.
@mike-flores this is not a clear report. Please file a new issue and describe what you’re reporting in more detail (“broken” how?)
I’m locking because the discussion is starting to go offtopic and we risk losing important information in a closed issue.
while running npm audit , I am getting the below error for 'react-scripts' (1 low vulnerability ), could you please help me ?
Below I have added my package.json.
Error is for : "react-scripts > webpack-dev-server > yargs > yargs-parser"
npm audit
Low Prototype Pollution
Package yargs-parser
Patched in >=13.1.2 <14.0.0 || >=15.0.1 <16.0.0 || >=18.1.2
Dependency of react-scripts
Path react-scripts > webpack-dev-server > yargs > yargs-parser
More info https://npmjs.com/advisories/1500
package.json -> dependencies
"dependencies": { "react": "^16.12.0", "react-dom": "^16.12.0", "react-router-dom": "^5.1.2", "react-scripts": "3.4.0", "reactstrap": "^8.4.1" },