# Svelte devalue prototype pollution via uneval

Source: https://junglewise.ai/threats/svelte-devalue-prototype-pollution-via-uneval-14b7c8df  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-02-19. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

Severity: medium · CVSS 4 · Published 2026-02-19

Svelte's devalue library converts JavaScript objects into a serialized string representation. When that serialized code is later evaluated, it can create objects with polluted prototypes under certain circumstances, causing the restored object to have a different structure than the original. This allows an attacker to inject malicious properties into the prototype chain, potentially affecting all objects derived from that prototype.

Technologies: [devalue (npm)](https://junglewise.ai/threats/technologies/devalue). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Medium severity, with a CVSS score of 4, published 19 February 2026.

**Which products and versions are affected?** devalue (npm) SEMVER:introduced=0,fixed=5.6.3.

**Is there a fix for This vulnerability?** Yes. devalue (npm): upgrade to 5.6.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked over the network, in a software library.

**Am I affected?** Check whether you run devalue (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- devalue (npm): upgrade to 5.6.3 or later

  ```sh
  npm install devalue@5.6.3
  ```


## Technical details

The vulnerability is a prototype pollution flaw (CWE-1321) in the devalue library's `uneval` function. When untrusted data is serialized via `uneval`, the generated output code can, under certain circumstances, create objects with polluted prototypes when later evaluated. The attack requires the output of `uneval` to be passed through `eval`, high privileges, and certain special conditions to trigger. An attacker exploiting this can alter the prototype chain of deserialized objects, allowing injection of properties that affect subsequent object operations. The fix is available in version 5.6.3, which properly handles `__proto__` pollution.

## Affected products

- Svelte devalue <= 5.6.2

## Timeline

- 2026-02-19: disclosed: Advisory GHSA-8qm3-746x-r74r published
- 2026-02-19: patched: Fix released in version 5.6.3

## References

- [https://github.com/sveltejs/devalue/security/advisories/GHSA-8qm3-746x-r74r](https://github.com/sveltejs/devalue/security/advisories/GHSA-8qm3-746x-r74r)
- [https://github.com/sveltejs/devalue/commit/0f04d4d678eac39ad5d7a07d1956275d7874e81c](https://github.com/sveltejs/devalue/commit/0f04d4d678eac39ad5d7a07d1956275d7874e81c)

## Related threats

- [devalue uneval sparse-array CPU amplification](https://junglewise.ai/threats/devalue-residual-sparse-array-cpu-amplification-in-uneval-288a909c)
- [devalue quadratic expansion in uneval with repeated primitives](https://junglewise.ai/threats/devalue-repeated-primitive-strings-cause-quadratic-expansion-in-uneval-9363872e)
- [devalue sparse arrays excessive memory allocation in uneval](https://junglewise.ai/threats/devalue-sparse-arrays-emitted-by-uneval-cause-eager-allocation-when-79528840)
- [devalue ArrayBuffer allocation bypass via custom reviver](https://junglewise.ai/threats/devalue-custom-arraybuffer-revivers-can-bypass-typed-array-allocation-ecd9322f)
- [devalue stringifyAsync unhandled promise rejection](https://junglewise.ai/threats/devalue-stringifyasync-can-cause-an-unhandled-rejection-despite-a-1b814ff8)
