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

> The devalue library can emit objects with __proto__ properties, potentially leading to prototype pollution if downstream code uses unsafe assignment methods.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 12 Mar 2026

## What is GHSA-mwv9-gp5h-frr4?

GHSA-mwv9-gp5h-frr4 is a vulnerability in devalue, published on 12 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

## Which versions are affected by GHSA-mwv9-gp5h-frr4?

2 open source packages ship an affected version, including devalue.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `devalue` | npm | From 4.0.0 | 5.6.4 |
| `devalue` | npm | From 4.0.0 | 5.6.4 |

## How do I fix GHSA-mwv9-gp5h-frr4?

Upgrade devalue to 5.6.4 or later.

## Is GHSA-mwv9-gp5h-frr4 being exploited?

There is no known exploitation of GHSA-mwv9-gp5h-frr4 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-mwv9-gp5h-frr4 and fix it if it is affected.

What it is: GHSA-mwv9-gp5h-frr4 is a vulnerability in devalue, published on 12 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-mwv9-gp5h-frr4 in the wild and no public exploit code.

Affected packages and fixed versions:
- devalue (npm): affected from 4.0.0; fixed in 5.6.4
- devalue (npm): affected from 4.0.0; fixed in 5.6.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-mwv9-gp5h-frr4/ (Markdown: https://insights.sbomify.com/GHSA-mwv9-gp5h-frr4/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-mwv9-gp5h-frr4

---
From sbomify Insights: https://insights.sbomify.com/GHSA-mwv9-gp5h-frr4/
Summaries are generated and may contain mistakes; the official description above is the record.
