You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Server-Side-Request Forgery vulnerability introduced in npm 10.4 [BUG] <title> #7216
That's a vulnerability in a package npm happens to use, and since the npm cli doesn't have any servers, it can't be vulnerable to SSRF. It's a false positive.
Reacted by Rémy Oudemans
Reacted by brock, Dmitrii Kustov, Kelsea Potter, Joe Stead, Paul Reesman, mihob, Agustin Forero, Mark Brady, Shaun O'Connor and Arno Genicot
You guys could simply not bundle your dependencies and allow consumers to address this. There is a readily available fix via npm audit fix which will update socks to 2.7.3 which replaces the ip package with ip-address
Reacted by Kelsea Potter, Chris de Almeida, Mark Henriksen, ahampal, invariants, Jasper Boyd, Arno Genicot and Josh Miles
Here you can find how ip was used in socks (comparing last release with the previous one). As far I see the method isPublic was not used by socks. ip.isPublic() seems to be the only affected method in this CVE.
The vulnerability is not affected npm, but npm is part of the node and every official node docker image contains npm. Everyone who uses the official docker image got alert.
In my case the CI does not allow to publish new docker image if it contains new vulnerability.
Currently I have the following options:
add ip to whitelist independently it is used by npm or other library. In this case I will lose the alert if other package uses ip now or in the future. I also have to remove ip from the whitelist after the ecosystem updated to the newer ip version. So I have to double work.
switch to other base image that does not contains npm.
wait for npm to update socks and for new node docker image
I manage the whitelist at docker image level so does not matter which option I will choose it takes time for me.
My setup blocks the dependabot and development PRs too, so I can't wait too much. I added ip to the whitelist of the currently developed services, but I don't really would like to do it with others that just under maintenance.
I don't know how large effort need to update socks and release new node, but my assumption is, it is much less than everyone else find the alternative way to handle the situation.
My other assumption is answer to comment on this issue will need more effort than just update socks and release a new version.
I would like to kindly ask you if you have time please update socks and release a new version and manage the new release of node. I think it is the best option for the community.
You wouldn't need a new release of node, you'd just update npm in your docker image.
However yes, you're right, this is a fundamental flaw in the CVE system for any package that has more than one code path, and usually one just does option 1 or 3.
You wouldn't need a new release of node, you'd just update npm in your docker image.
Do you mean run npm i -g npm ?
If yes then the prerequisite is a new npm release.
After that I have to modify every Docker file to add the npm i -g npm. It adds ~15 MB extra size to the docker image even if the latest npm version in the docker image. Just for comparison the average npm_modules and application code size is ~50MB of my services.
This is the reason why would be optimal to release a new node version too.
If I have to do this extra work I would go with option 2 but it also has blockers :) Google distroless supports only node LTS version, so I can't use the built in test runner of node.
I just would like to know what is the plan of the npm team. Because based on it I can do better decision.
p.s.
I am wondering why not so many people complaining about it.
Reacted by Agustin Forero, Eduardo Rodrigues and Jasper Boyd
This would affect anyone using semantic-release, specifically @semantic-release/npm. I don't know why but they have a dependency on npm even though they basically just do an exec('npm publish') but with the locally installed npm binary.
In general, most CVEs in the JS ecosystem are false positives, due to dep graphs having lots of transitive dependencies and CVEs having no fundamental code path branching mechanism. Therefore, it is unreasonable to have any systems that block progress based on the presence of a CVE, without also having an easy "bypass" mechanism to unblock progress.
Nobody using npm is affected by this vulnerability - however they may be inconvenienced by subpar audit processes and/or tooling.
I wasted half an hour trying to see how to fix this when npm installitself threw warnings due to semantic-release's dependency, and then npm audit fix refuses to fix the issue. Ironic.
Just want to add my voice to everyone requesting this get fixed on the npm side.
Reacted by Dmitrii Kustov, brock, Alois Sečkár, Kelsea Potter, Nam Nguyen Thai - CLV, Agustin Forero, Eduardo Rodrigues and Jasper Boyd
I just hope new version with a fix will come soon. Good to know the "vulnerability" isnt actually a vulnerability, but seeing the warnings during npm install and have the Dependabot alert opened is quite inconvenient.
I guess there is no way to temporary change my package.json to override it somehow, since it is a bundled dependency?
Any update on this issue? This is a legitimate issue for our organization. As much as pushing back may make sense, it's not going to change the fact that npm is dependent on a vulnerable dependency that is being tracked via npm audit's global vulnerability database (GHSA-78xj-cgh5-2h22).
Any update on this issue? This is a legitimate issue for our organization. As much as pushing back may make sense, it's not going to change the fact that npm is dependent on a vulnerable dependency that is being tracked via npm audit's global vulnerability database.
Seconding this. Could use an update ASAP.
Reacted by Eduardo Rodrigues, invariants and Max Paspa
@pog-charlesinglese this just proves, that even 2 years dead repo is able to act faster than npm/cli team (unless it was them who ressurected it and made the patch directly in the source unlike others who switched to another library)
Reacted by Chris de Almeida, Alois Sečkár, Martin Cermak, Mark Brady, invariants, Sergio Gómez, Javier Benito, dtourassis, Agustin Forero and Eduardo Rodrigues
Just a reminder that npm version 10 is the only supported npm version. We did a backport on v9 but that is only because we are trying to iron out the backporting process in general. npm 9 and 8 are not supported. We will not be updating npm 8.
Activity
ljharb commentedon Feb 12, 2024
That's a vulnerability in a package npm happens to use, and since the npm cli doesn't have any servers, it can't be vulnerable to SSRF. It's a false positive.
ctcpip commentedon Feb 13, 2024
adding the CVE here so it can show up in search: CVE-2023-42282 --- GHSA-78xj-cgh5-2h22
it may be a false positive for
npmitself, but I expect we won't hear the end of this till the lib is patched or replaced.edit:
sockshas replaced it withip-address, so bumpingsockswill resolvejcnix commentedon Feb 13, 2024
You guys could simply not bundle your dependencies and allow consumers to address this. There is a readily available fix via
npm audit fixwhich will updatesocksto2.7.3which replaces theippackage withip-addressUlisesGascon commentedon Feb 14, 2024
You can find more context in indutny/node-ip#136
Here you can find how
ipwas used insocks(comparing last release with the previous one). As far I see the methodisPublicwas not used bysocks.ip.isPublic()seems to be the only affected method in this CVE.ert78gb commentedon Feb 14, 2024
The vulnerability is not affected npm, but npm is part of the node and every official node docker image contains npm. Everyone who uses the official docker image got alert.
In my case the CI does not allow to publish new docker image if it contains new vulnerability.
Currently I have the following options:
ipto whitelist independently it is used by npm or other library. In this case I will lose the alert if other package usesipnow or in the future. I also have to removeipfrom the whitelist after the ecosystem updated to the neweripversion. So I have to double work.socksand for new node docker imageI manage the whitelist at docker image level so does not matter which option I will choose it takes time for me.
My setup blocks the dependabot and development PRs too, so I can't wait too much. I added
ipto the whitelist of the currently developed services, but I don't really would like to do it with others that just under maintenance.I don't know how large effort need to update
socksand release new node, but my assumption is, it is much less than everyone else find the alternative way to handle the situation.My other assumption is answer to comment on this issue will need more effort than just update
socksand release a new version.I would like to kindly ask you if you have time please update
socksand release a new version and manage the new release of node. I think it is the best option for the community.ljharb commentedon Feb 14, 2024
You wouldn't need a new release of node, you'd just update npm in your docker image.
However yes, you're right, this is a fundamental flaw in the CVE system for any package that has more than one code path, and usually one just does option 1 or 3.
ert78gb commentedon Feb 14, 2024
Do you mean run
npm i -g npm?If yes then the prerequisite is a new
npmrelease.After that I have to modify every
Dockerfile to add thenpm i -g npm. It adds ~15 MB extra size to the docker image even if the latest npm version in the docker image. Just for comparison the average npm_modules and application code size is ~50MB of my services.This is the reason why would be optimal to release a new node version too.
If I have to do this extra work I would go with option 2 but it also has blockers :) Google distroless supports only node LTS version, so I can't use the built in test runner of node.
I just would like to know what is the plan of the npm team. Because based on it I can do better decision.
p.s.
I am wondering why not so many people complaining about it.
ljharb commentedon Feb 14, 2024
Yes, that's what i mean. I'm not sure why it would add much size; npm is already contained within node.
jcnix commentedon Feb 14, 2024
This would affect anyone using semantic-release, specifically @semantic-release/npm. I don't know why but they have a dependency on
npmeven though they basically just do anexec('npm publish')but with the locally installednpmbinary.ljharb commentedon Feb 14, 2024
In general, most CVEs in the JS ecosystem are false positives, due to dep graphs having lots of transitive dependencies and CVEs having no fundamental code path branching mechanism. Therefore, it is unreasonable to have any systems that block progress based on the presence of a CVE, without also having an easy "bypass" mechanism to unblock progress.
Nobody using npm is affected by this vulnerability - however they may be inconvenienced by subpar audit processes and/or tooling.
ardunster commentedon Feb 15, 2024
I wasted half an hour trying to see how to fix this when
npm installitself threw warnings due tosemantic-release's dependency, and thennpm audit fixrefuses to fix the issue. Ironic.Just want to add my voice to everyone requesting this get fixed on the npm side.
AloisSeckar commentedon Feb 15, 2024
I just hope new version with a fix will come soon. Good to know the "vulnerability" isnt actually a vulnerability, but seeing the warnings during npm install and have the Dependabot alert opened is quite inconvenient.
I guess there is no way to temporary change my package.json to override it somehow, since it is a bundled dependency?
8 remaining items
pog-charlesinglese commentedon Feb 21, 2024
Any update on this issue? This is a legitimate issue for our organization. As much as pushing back may make sense, it's not going to change the fact that npm is dependent on a vulnerable dependency that is being tracked via npm audit's global vulnerability database (GHSA-78xj-cgh5-2h22).
agforero commentedon Feb 21, 2024
Seconding this. Could use an update ASAP.
pog-charlesinglese commentedon Feb 21, 2024
FWIW, dependabot already has an open PR for this and we've spent more time on discourse than it would take to approve and merge the PR (#7238)
ljharb commentedon Feb 22, 2024
@pog-charlesinglese sure but nobody who's commented here, myself included, has the ability to do so, so that's not a meaningful comparison :-)
AloisSeckar commentedon Feb 22, 2024
@pog-charlesinglese this just proves, that even 2 years dead repo is able to act faster than npm/cli team (unless it was them who ressurected it and made the patch directly in the source unlike others who switched to another library)
vbrinza commentedon Feb 22, 2024
Interested in a patch too
wraithgar commentedon Feb 22, 2024
This is possible for all other packages except npm. For, without npm already fully installed how could it install its own dependencies?
wraithgar commentedon Feb 22, 2024
#7242 Updates
ip.Soumalya-Github commentedon Feb 23, 2024
Isn't there any patch release for the change in #7242 ?
wraithgar commentedon Feb 23, 2024
#7184 is the next release.
Soumalya-Github commentedon Feb 26, 2024
Thanks! So for v9 also are we having a patch release or its only for v10 ?
errodrigues commentedon Feb 26, 2024
Any hopes for v8 too?
errodrigues commentedon Feb 28, 2024
I think v9.9.3 was just released with the fix.
See #7010
wraithgar commentedon Feb 28, 2024
Just a reminder that npm version 10 is the only supported npm version. We did a backport on v9 but that is only because we are trying to iron out the backporting process in general. npm 9 and 8 are not supported. We will not be updating npm 8.