-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
Release: 5.2.1 #6933
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
Release: 5.2.1 #6933
Conversation
This reverts commit 2f64f68.
|
why revert the security patch? |
|
Wow this is sus AF. |
|
@UlisesGascon @jonchurch @ctcpip Could you guys provide a reason why this was reverted? I'm reading in #6931 that the change is a semver major => does that mean you'll release 6.0.0 with that change in place? Or what's the plan here? |
|
Hi, why revert a security patch, without explanation? |
|
Reverting that commit brings back Even if the original fix was considered semver-major, this rollback effectively restores a known security issue in the v5 line. Could the @jonchurch, @UlisesGascon clarify:
This reversion has real security implications, so any guidance would be appreciated. |
|
Good thing I checked the changelog. Due to the lack of any explanation, I’m sticking with version 5.2.0 for now, the whole situation feels rather suspicious. At this point, I can’t exclude the possibility that something malicious might have been injected into the npm package |
|
Sorry for the earlier lack of clarity regarding the commit revert and the subsequent release. We decided to release this version with the revert because:
The underlying issue is that I included that commit prematurely in the releases (4.22.0 and 5.2.0) . That CVE was created before we introduced the Incident Response Plan (ref: expressjs/security-wg#56) and was never migrated to follow the updated process. We are considering preparing a brief post-mortem to clarify what happened and to outline some changes we plan to implement to prevent this root cause from occurring again in the future. |
|
But this leaves 5.2.1 and other versions except for 5.2.0 still subject to a quite serious vulnerability? |
As far as I understand the low severity "vulnerability" is that properties that exist in object's prototype could be overwritten (e.g. Let's say you have code like this (maybe one that makes sense): app.set('query parser', 'extended');
app.use((req, res, next) => {
console.log(req.query.hasOwnProperty === 'abc');
next();
});This worked fine and with the patch still works as the author intended - it expects Now imagine that you have instead: app.set('query parser', 'extended');
app.use((req, res, next) => {
console.log(req.query.hasOwnProperty('foo'));
next();
});Without the patch this will throw an error for Now comes the patch and solves the problem - Disclaimer: I wrote this on my phone, while doing other things, so there may be mistakes in this response, as I haven't run any code to verify it. |
|
Important The prior release (5.2.0) included an erroneous breaking change related to the extended query parser. There is no actual security vulnerability associated with this behavior (CVE-2024-51999 has been rejected). The change has been fully reverted in this release. |
|
@RedShift1 I just wanted to jump in clarify that there wasn't a vulnerability here. There should be a post-mortem on why it was released at all, but GHSA-pj86-cfqh-vqx6 is invalid because there isn't any prototype pollution or other vulnerability. @krzysdz's response has a great explanation on why it's not a vulnerability, and I wanted to further add that this is just the behavior of JavaScript and anything that parses user supplied data, such as The issue that can occur with your code is that you might want to do something like If you are concerned about object keys that match the names of prototype keys, you can provide your own parser: app.set('query parser', function (str) {
return qs.parse(str);
});But keep in mind that if you expect a key that matches one on the prototype, such as |
Important
The prior release (5.2.0) included an erroneous breaking change related to the extended query parser. There is no actual security vulnerability associated with this behavior (CVE-2024-51999 has been rejected). The change has been fully reverted in this release.