CVE-2024-51999: Withdrawn Advisory Express Improperly Controls Modification Of Vulnerability

LOW
Advisory Identifier: GHSA-pj86-cfqh-vqx6
CWE-915
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2024-51999
GHSA Identifier GHSA-pj86-cfqh-vqx6
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes
Affected Product Withdrawn Advisory
Package Ecosystem npm
Published Date
Last Updated

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.

express fixed: 4.22.0
npm install express@4.22.0
express fixed: 5.2.0
npm install express@5.2.0
Verify Direct and Transitive Dependencies

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

## 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` ```js app.set('query parser', function (str) { return qs.parse(str, { plainObjects: true }); }); ```

CVE-2024-51999 Affected Withdrawn Advisory Versions

2 component(s)
Fixed Versions:
4.22.05.2.0
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?
CVE-2024-51999 is a security vulnerability in Withdrawn Advisory involving express improperly controls modification of query properties under CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes.
Which Withdrawn Advisory versions are affected?
Affected versions include releases prior to 4.22.0, 5.2.0 across affected packages: express.
What version fixes CVE-2024-51999?
Upgrading to 4.22.0, 5.2.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is express affected?
Yes, express is affected in releases prior to 4.22.0, 5.2.0. Upgrade your dependency to 4.22.0, 5.2.0 or later.
What CWE is associated with CVE-2024-51999?
CVE-2024-51999 is classified under 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 can I check npm dependencies for CVE-2024-51999?
Run the dependency tree command: 'npm ls express'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}