GHSA-mwv9-gp5h-frr4: Devalue Sveltejs Devalue's `devalue.parse` And `devalue.unflatten` Vulnerability

LOW
CWE-1321
Published
Advisory Summary

GHSA-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

CVE Identifier N/A
GHSA Identifier GHSA-mwv9-gp5h-frr4
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product Devalue
Package Ecosystem npm
Published Date
Last Updated

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.

devalue fixed: 5.6.4
npm install devalue@5.6.4
Verify Direct and Transitive Dependencies

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

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 ```

GHSA-mwv9-gp5h-frr4 Affected Devalue Versions

1 component(s)
Fixed Versions:
5.6.4
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?
GHSA-mwv9-gp5h-frr4 is a security vulnerability in Devalue involving Sveltejs devalue's `devalue.parse` and `devalue.unflatten` emit objects with `__proto__` own properties under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which Devalue versions are affected?
Affected versions include releases prior to 5.6.4 across affected packages: devalue.
What version fixes GHSA-mwv9-gp5h-frr4?
Upgrading to 5.6.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is devalue affected?
Yes, devalue is affected in releases prior to 5.6.4. Upgrade your dependency to 5.6.4 or later.
What CWE is associated with GHSA-mwv9-gp5h-frr4?
GHSA-mwv9-gp5h-frr4 is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') (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.).
How can I check npm dependencies for GHSA-mwv9-gp5h-frr4?
Run the dependency tree command: 'npm ls devalue'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}