NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

CVE-2025-32014: estree-util-value-to-estree allows prototype pollution in generated ESTree

mediumCVSS 4.0 6.9GHSA-f7f6-9jq7-3rqj

Impact When generating an ESTree from a value with a property named proto, valueToEstree would generate an object that specifies a prototype instead. Example: Output: 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.

Published Apr 7, 2025

Affected packages

estree-util-value-to-estree

Ecosystem
npm
Affected
< 3.3.3
Fixed in
3.3.3
Check
npm ls estree-util-value-to-estree

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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.

Credited to remcohaszing.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology