Sveltejs devalue's `devalue.parse` and `devalue.unflatten` emit objects with `__proto__` own properties
Affects devalueSource GCVE Database
CVSS 6.9 Medium : upgrade to 5.6.4 when convenient.
Data as of 26 Jun 2026, 22:08 UTC
- Patch
- Available – fixed in 5.6.4
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:UWhat to do
Upgrade devalue to 5.6.4.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmdevalue | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Users should audit and update their code to avoid merging objects returned by devalue.parse or devalue.unflatten into other objects without proper validation or sanitization. Avoid using Object.assign or similar methods on these objects if they might contain __proto__ properties.
Description
The devalue library versions 4.0.0 up to but not including 5.6.4 have a behavior where the functions devalue.parse and devalue.unflatten can produce objects containing own properties named __proto__. While this behavior alone is not a security vulnerability, it can lead to prototype pollution if downstream code improperly handles these objects, such as by using Object.assign. This can result in the target object's prototype being modified unintentionally. No known exploits are reported in the wild, and the severity is considered low.
References
- github.com/sveltejs/devalue/security/advisories/GHSA-mwv9-gp5h-frr4 (opens in a new tab)
- github.com/sveltejs/devalue/commit/87c1f3ce3759765a061cfe34843ecc4b0711ba8d (opens in a new tab)
- github.com/sveltejs/devalue (opens in a new tab)
- github.com/sveltejs/devalue/releases/tag/v5.6.4 (opens in a new tab)