GHSA-pj86-cfqh-vqx6 CVE-2024-51999
Withdrawn Advisory: express improperly controls modification of query properties
- Severity
- 2.7 / 10
- Low · CVSS 4.0
- Exploit chance (EPSS)
- —
- No score published
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-915 Improperly Controlled Modification of Dynamically-Determined Object Attributes
- Fix
4.22.0- Upgrade express to this version or later
Description
Withdrawn Advisory
This advisory has been withdrawn because it describes a correctness bug, not a vulnerability with real security impact. This link is maintained to preserve external references.
Original Description
Impact
when using the extended query parser in express ('query parser': 'extended'), the request.query object inherits all object prototype properties, but these properties can be overwritten by query string parameter keys that match the property names
[!IMPORTANT]
the extended query parser is the default in express 4; this was changed in express 5 which by default uses the simple query parser
Patches
the issue has been patched to ensure request.query is a plain object so request.query no longer has object prototype properties. this brings the default behavior of extended query parsing in line with express's default simple query parser
Workaround
this only impacts users using extended query parsing ('query parser': 'extended'), which is the default in express 4, but not express 5. all users are encouraged to upgrade to the patched versions, but can otherwise work around this issue:
provide qs directly and specify plainObjects: true
app.set('query parser',
function (str) {
return qs.parse(str, {
plainObjects: true
});
});
Affected versions
npm
| Package | Vulnerable | Fixed in |
|---|---|---|
| express | < 4.22.0 |
4.22.0 |
| express | >= 5.0.0, < 5.2.0 |
5.2.0 |
| express | < 4.22.0 |
4.22.0 |
| express | >= 5.0.0, < 5.2.0 |
5.2.0 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
express npm → 4.22.0
- npm
npm install express@4.22.0- yarn
yarn add express@4.22.0- pnpm
pnpm add express@4.22.0
Severity breakdown
CVSS 4.0 2.7
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:U
- Attack vector
- Network
- Attack complexity
- Low
- Attack requirements
- None
- Privileges required
- None
- User interaction
- None
- Confidentiality (vulnerable system)
- None
- Integrity (vulnerable system)
- Low
- Availability (vulnerable system)
- None
- Confidentiality (subsequent systems)
- None
- Integrity (subsequent systems)
- None
- Availability (subsequent systems)
- None
- Exploit maturity
- Unreported
Weakness
CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes
The product receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified.
How to prevent it
- Implementation: If available, use features of the language or framework that allow specification of allowlists of attributes or fields that are allowed to be modified. If possible, prefer allowlists over denylists. For applications written with Ruby on Rails, use the attr_accessible (allowlist) or attr_protected (denylist) macros in each class that may be used in mass assignment.
- Architecture and Design, Implementation: If available, use the signing/sealing features of the programming language to assure that deserialized data has not been tainted. For example, a hash-based message authentication code (HMAC) could be used to ensure that data has not been modified.
- Implementation: For any externally-influenced input, check the input against an allowlist of internal object attributes or fields that are allowed to be modified.
- Implementation, Architecture and Design: Refactor the code so that object attributes or fields do not need to be dynamically identified, and only expose getter/setter functionality for the intended attributes.
References
Advisories
Fixes and patches
Packages
Other links
Timeline
- Published
- Withdrawn
- Last updated by the source
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-cm5g-3pgc-8rg4 Express ressource injection | Medium | Also affects express |
| GHSA-jj78-5fmv-mv28 Express Open Redirect vulnerability | Medium | Also affects express |
| GHSA-qw6h-vgh9-j6wx express vulnerable to XSS via response.redirect() | Medium | Also affects express |
| GHSA-rv95-896h-c2vc Express.js Open Redirect in malformed URLs | Medium | Also affects express |
| GHSA-gpvr-g6gh-9mc2 No Charset in Content-Type Header in express | Medium | Also affects express |
| GHSA-66wr-7vmr-p5jq Payload authentication token field handling issue | Critical | Same weakness, CWE-915 |
| EEF-CVE-2026-93477 Private action arguments can be set by user input on the bulk destroy and bulk update paths in Ash | Not rated yet | Same weakness, CWE-915 |
| GHSA-gx83-3vf8-gh7j jackson-databind: Comparable missing from DefaultBaseTypeLimitingValidator's unsafe base types (incomplete PolymorphicTypeValidator denylist) | Medium | Same weakness, CWE-915 |
Credits: UlisesGascon, bjohansebas, ctcpip, jonchurch, wesleytodd
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor