GHSA-F7F6-9JQ7-3RQJ

Vulnerability from github – Published: 2025-04-07 19:09 – Updated: 2025-04-07 19:09
VLAI
Summary
estree-util-value-to-estree allows prototype pollution in generated ESTree
Details

Impact

When generating an ESTree from a value with a property named __proto__, valueToEstree would generate an object that specifies a prototype instead.

Example:

import { generate } from 'astring'
import { valueToEstree } from 'estree-util-value-to-estree'

const estree = valueToEstree({
  ['__proto__']: {}
})
const code = generate(estree)
console.log(code)

Output:

{
  "__proto__": {}
}

Patches

This was fixed in version 3.3.3.

Workarounds

If you control the input, don’t specify a property named __proto__. If you don’t control the output, strip any properties named __proto__ before passing it to valueToEstree.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "estree-util-value-to-estree"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.3.3"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2025-32014"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-1321"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-04-07T19:09:48Z",
    "nvd_published_at": "2025-04-07T15:15:44Z",
    "severity": "MODERATE"
  },
  "details": "### Impact\nWhen generating an ESTree from a value with a property named `__proto__`, `valueToEstree` would generate an object that specifies a prototype instead.\n\nExample:\n\n```js\nimport { generate } from \u0027astring\u0027\nimport { valueToEstree } from \u0027estree-util-value-to-estree\u0027\n\nconst estree = valueToEstree({\n  [\u0027__proto__\u0027]: {}\n})\nconst code = generate(estree)\nconsole.log(code)\n```\n\nOutput:\n\n```js\n{\n  \"__proto__\": {}\n}\n```\n\n### Patches\nThis was fixed in version [3.3.3](https://github.com/remcohaszing/estree-util-value-to-estree/releases/tag/v3.3.3).\n\n### Workarounds\nIf you control the input, don\u2019t specify a property named `__proto__`. If you don\u2019t control the output, strip any properties named `__proto__` before passing it to `valueToEstree`.",
  "id": "GHSA-f7f6-9jq7-3rqj",
  "modified": "2025-04-07T19:09:48Z",
  "published": "2025-04-07T19:09:48Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/remcohaszing/estree-util-value-to-estree/security/advisories/GHSA-f7f6-9jq7-3rqj"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-32014"
    },
    {
      "type": "WEB",
      "url": "https://github.com/remcohaszing/estree-util-value-to-estree/commit/d0c394fbc64bc55937ffe4e162b81f15ba506e55"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/remcohaszing/estree-util-value-to-estree"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
      "type": "CVSS_V4"
    }
  ],
  "summary": "estree-util-value-to-estree allows prototype pollution in generated ESTree"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…