-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[BUG] CVE-2024-21538 - cross-spawn to 7.0.5+ #7902
Comments
Note that this vulnerability is rated as "High". |
indeed, but since you'd have to be attacking yourself to trigger the ReDOS in npm, it's not actually a vulnerability here. |
Any update on this? |
any update on this issue? |
As a workaround, if you're using the Trivy GitHub action, you could exclude the bundled package from the scan by specifying e.g. uses: aquasecurity/trivy-action
with:
skip-dirs: node_modules,/usr/local/lib/node_modules/npm/node_modules/cross-spawn Update: For some reason, this only works with my local trivy CLI, not the GitHub action. |
Another workaround is simply creating a |
By the way, they have just released a new version - |
This is preventing my team from deploying because of an automated security scan in google cloud. I know the vulnerability is basically a non-issue in the context of the cli, but the scan does not. Please bump past the vulnerable version as part of the weekly release. From the lockfile, I think the cli only has it as a transitive dependency, and the transitives have version ranges compatible with the fixed version so it shouldn't be too hard and it's make a huge difference to anyone at the mercy of automated security scans they can't control. I'd be happy to try and do it myself, but the contribution guidelines explicitly disallow third party fixes for dependencies. |
For us this was a non-issue because we realized don't really need The fix is simple when that is the case. In the Docker image we deploy, simply removed
This also made me realize that we don't need I know that some projects need So actually for us this was an improvement in reducing the threat surface of our deployed app 😸 |
Thank you, I really appreciate your offering a solution. We're trying something similar, but it'd be nice not to have to and I don't know what a project that needed npm in the final image would do. |
I'm guessing here, but if you need updated
|
When this will be fix? |
I have a PR open to fix the vuln in foreground-child: tapjs/foreground-child#60 |
Any update on this issue ? |
Created a PR but just read that dependency upgrades will be closed and only maintainers can do this, so tagging those maintainers here as this is block loads of people. 🙇🏻 |
I'm using Node.js 22.9 & npm 10.8.2 version. |
Hey @juhyunk0820 which version of node is not vulnerable according to you ? |
honestly, the wide use of npm alone should be cause enough to keep it updated. To let it go a week?? srsly, professionalism is gone these days. |
@nilesh-sutar4755 I'm using [email protected] & [email protected]. it's not velnerable in my case. |
I'm gonna suggest here a strange looking fix - some of you may actually not need |
@gidsola Give them a break, we're talking about open-source code here, you know how these things go -- they're maintained by overworked volunteers who could probably use a break from aggressive remarks like these |
Their release process says they do releases on Wednesdays. Out-of-band releases could happen for critical vulns, but they don't say that about high vulns. I'm hopeful that we'll see a resolution tomorrow. Source: https://github.com/npm/cli/wiki/Release-Process#overview |
also, it's not actually a vulnerability based on its usage in npm, so it shouldn't be blocking anyone unless their security policies are incorrectly over-rigid. |
You are right. |
As has been pointed out already, this is not a critical vulnerability, it is a false positive. The package itself has a vulnerability but it does not affect npm. This will be updated w/ the next npm release which should be soon. |
@wraithgar is this confirmed fixed in https://nodejs.org/en/blog/release/v20.18.1? I could have sworn I saw the release notes for 20.18.1 on 11/13/2024. |
@wraithgar and other maintainers- I'm following these: It does not appear that Node v20.18.1, shipping with npm v10.8.2, addresses this CVE. Checking the package-lock for npm v10.8.2, cross-spawn is still at a vulnerable level of v7.0.3. So, it's still unclear to me that uplifting from v20.18.0 to v20.18.1 will remediate this issue. Will there be another Node v20.18.1+ release prior to next Wednesday? |
The last few versions of node 20 always shipped with npm 10.8.2, and I doubt this will be changed soon given that there has been 10.8.3 and 10.9.0 for a while but only node 22 gets shipped with npm 10.9.0 Node is not npm and vice versa, even if npm is bundled when installing node. You can, and should, upgrade your npm independently from node and always do so after a fresh install of node Npm hasn't released 10.9.1 with the fix yet, so I don't see how node would have addressed this in 20.18.1. It's much more likely that node 22 will get that upgrade before node 20 |
I can confirm this worked for my gcloud build. thanks! |
Fixed in npm 10.9.1 (and 9.9.4) |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
@wraithgar Since we cannot create updates of bundled node_modules, could you please bump the
cross-spawn
to 7.0.5 or higher?https://security.snyk.io/vuln/SNYK-JS-CROSSSPAWN-8303230
Expected Behavior
No response
Steps To Reproduce
Environment
; copy and paste output from `npm config ls` here
The text was updated successfully, but these errors were encountered: