GitHub Advisoryadvisory · npm

GHSA-mwv9-gp5h-frr4 Sveltejs devalue's `devalue.parse` and `devalue.unflatten` emit objects with `__proto__` own properties

LOW Published 2026-03-12 Modified 2026-06-26 Official page ↗
Ecosystem
npm
Packages
devalue
Severity
Low
CVSS vector
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
Weaknesses
CWE-1321
Reviewed
2026-03-12

Affected packages

• npm devalue: >= 4.0.0, < 5.6.4 → fixed in 5.6.4

Description

In some circumstances, `devalue.parse` and `devalue.unflatten` could emit objects with `__proto__` own properties. This in and of itself is not a security vulnerability (and is possible with, for example, `JSON.parse` as well), but it can result in prototype injection if _downstream_ code handles it incorrectly: ```ts const result = devalue.parse(/* input creating an object with a __proto__ property */); const target = {}; Object.assign(target, result); // target's prototype is now polluted ```

Related

Weakness · CWE (1)

  • CWE-1321 Improperly Controlled Modification of Object Prototype Attributes weakness

References