CVE-2024-51999: Withdrawn Advisory Express Improperly Controls Modification Of Vulnerability
LOWCVE-2024-51999 is a LOW express improperly controls modification of vulnerability (CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes) affecting Withdrawn Advisory libraries in the npm ecosystem. The issue involves express improperly controls modification of query properties. Remediation is available by upgrading affected packages to version 4.22.0, 5.2.0.
CVE-2024-51999 at a Glance
How to Fix CVE-2024-51999
To remediate this vulnerability, upgrade all affected Withdrawn Advisory dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install express@4.22.0
npm install express@5.2.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls express
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2024-51999, inspect your project dependencies using npm:
npm ls express
Analyze the terminal output to locate any version of Withdrawn Advisory in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.22.0), your application is affected.
Note: The npm ls express command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes, where 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. In Withdrawn Advisory, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-51999 Affected Withdrawn Advisory Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
express
|
npm |
< 4.22.0
|
4.22.0
|
|
express
|
npm |
≥ 5.0.0
< 5.2.0
|
5.2.0
|
References
Frequently Asked Questions
What is CVE-2024-51999?
Which Withdrawn Advisory versions are affected?
What version fixes CVE-2024-51999?
Is express affected?
What CWE is associated with CVE-2024-51999?
How can I check npm dependencies for CVE-2024-51999?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pj86-cfqh-vqx6",
"modified" : "2025-12-02T15:11:19Z",
"published" : "2025-12-01T18:59:17Z",
"withdrawn" : "2025-12-02T15:11:19Z",
"aliases" : [ "CVE-2024-51999" ],
"summary" : "Withdrawn Advisory: express improperly controls modification of query properties",
"details" : "## Withdrawn Advisory\nThis 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.\n\n## Original Description\n### Impact\n\nwhen 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\n\n> [!IMPORTANT] \n> the extended query parser is the default in express 4; this was changed in express 5 which by default uses the simple query parser\n\n### Patches\n\nthe 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\n\n### Workaround\n\nthis 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:\n\n#### provide `qs` directly and specify `plainObjects: true`\n\n```js\napp.set('query parser',\n function (str) {\n return qs.parse(str, {\n plainObjects: true\n });\n});\n```",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "express"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.22.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "express"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.2.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/expressjs/express/security/advisories/GHSA-pj86-cfqh-vqx6"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-51999"
}, {
"type" : "WEB",
"url" : "https://github.com/expressjs/express/commit/2f64f68c37c64ae333e41ff38032d21860f22255"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/expressjs/express"
}, {
"type" : "WEB",
"url" : "https://github.com/expressjs/express/releases/tag/4.22.0"
}, {
"type" : "WEB",
"url" : "https://github.com/expressjs/express/releases/tag/v5.2.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-915" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2025-12-01T18:59:17Z",
"nvd_published_at" : "2025-12-01T21:15:49Z"
}
}