GHSA-mwv9-gp5h-frr4: Devalue Sveltejs Devalue's `devalue.parse` And `devalue.unflatten` Vulnerability
LOWGHSA-mwv9-gp5h-frr4 is a LOW sveltejs devalue's `devalue.parse` and `devalue.unflatten` vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Devalue libraries in the npm ecosystem. The issue involves sveltejs devalue's `devalue.parse` and `devalue.unflatten` emit objects with `__proto__` own properties. Remediation is available by upgrading affected packages to version 5.6.4.
GHSA-mwv9-gp5h-frr4 at a Glance
How to Fix GHSA-mwv9-gp5h-frr4
To remediate this vulnerability, upgrade all affected Devalue dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install devalue@5.6.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls devalue
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-mwv9-gp5h-frr4, inspect your project dependencies using npm:
npm ls devalue
Analyze the terminal output to locate any version of Devalue in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.6.4), your application is affected.
Note: The npm ls devalue command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In Devalue, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-mwv9-gp5h-frr4 Affected Devalue Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
devalue
|
npm |
≥ 4.0.0
< 5.6.4
|
5.6.4
|
References
Frequently Asked Questions
What is GHSA-mwv9-gp5h-frr4?
Which Devalue versions are affected?
What version fixes GHSA-mwv9-gp5h-frr4?
Is devalue affected?
What CWE is associated with GHSA-mwv9-gp5h-frr4?
How can I check npm dependencies for GHSA-mwv9-gp5h-frr4?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mwv9-gp5h-frr4",
"modified" : "2026-06-26T20:30:20Z",
"published" : "2026-03-12T16:38:15Z",
"aliases" : [ ],
"summary" : "Sveltejs devalue's `devalue.parse` and `devalue.unflatten` emit objects with `__proto__` own properties",
"details" : "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:\n\n```ts\nconst result = devalue.parse(/* input creating an object with a __proto__ property */);\nconst target = {};\nObject.assign(target, result); // target's prototype is now polluted\n```",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "devalue"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "5.6.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/sveltejs/devalue/security/advisories/GHSA-mwv9-gp5h-frr4"
}, {
"type" : "WEB",
"url" : "https://github.com/sveltejs/devalue/commit/87c1f3ce3759765a061cfe34843ecc4b0711ba8d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/sveltejs/devalue"
}, {
"type" : "WEB",
"url" : "https://github.com/sveltejs/devalue/releases/tag/v5.6.4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-12T16:38:15Z",
"nvd_published_at" : null
}
}