estree-util-value-to-estree allows prototype pollution in generated ESTree
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | estree-util-value-to-estree | < 3.3.3 | 3.3.3 |
References
- https://github.com/remcohaszing/estree-util-value-to-estree/security/advisories/GHSA-f7f6-9jq7-3rqj
- https://nvd.nist.gov/vuln/detail/CVE-2025-32014
- https://github.com/remcohaszing/estree-util-value-to-estree/commit/d0c394fbc64bc55937ffe4e162b81f15ba506e55
- https://github.com/remcohaszing/estree-util-value-to-estree
- CVSS vector
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- Weakness (CWE)
CWE-1321- Platform
- npm
- Package
estree-util-value-to-estree- Disclosed
- 07.04.2025
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-f7f6-9jq7-3rqj - CC BY 4.0
Vulnerability history: estree-util-value-to-estree
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
This is the only known vulnerability of this package.
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.