همهٔ گزارش‌ها
متوسط

estree-util-value-to-estree allows prototype pollution in generated ESTree

متن اصلی

نسخه‌های متأثر

نسخه‌های متأثر
< 3.3.3
نسخهٔ اصلاح‌شده
3.3.3

بهره‌برداری

CVE-2025-32014

احتمال بهره‌برداری در ۳۰ روز آینده: 0.46%

FIRST EPSS · ۱۴۰۵/۰۸/۲۶

شرح آسیب‌پذیری

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.

پیوندها

گزارش‌دهندگان

  • remcohaszing