Every CVE Search/ Get API key

CVE-2025-57820

Svelte devalue vulnerable to prototype pollution

7.9 HighFix available

Svelte devalue is a utility library. Prior to version 5.3.2, a string passed to devalue.parse could represent an object with a proto property and devalue.parse does not check that an index is numeric. This could result in assigning prototypes to objects and properties, leading to prototype pollution. This issue has been fixed in version 5.3.2

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
None

Exploit likelihood

0.37%Up 0.3 points since Aug 27, 2025
90%50%10%1%

What each source reports

CVE List Score used 7.9

Svelte devalue vulnerable to prototype pollution

Svelte devalue is a utility library. Prior to version 5.3.2, a string passed to devalue.parse could represent an object with a proto property and devalue.parse does not check that an index is numeric. This could result in assigning prototypes to objects and properties, leading to prototype pollution. This issue has been fixed in version 5.3.2

Record
CVE-2025-57820
CVSS 4.0
7.9 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H
Weakness
CWE-1321
Updated
2026-11-02
EUVDEUVD-2025-25863 7.9

Svelte devalue is a utility library. Prior to version 5.3.2, a string passed to devalue.parse could represent an object with a proto property and devalue.parse does not check that an index is numeric. This could result in assigning prototypes to objects and properties, leading to prototype pollution. This issue has been fixed in version 5.3.2

Record
EUVD-2025-25863
CVSS 4.0
7.9 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H
Updated
2026-11-02
GitHub AdvisoriesGHSA-vj54-72f3-p5jv 7.9

devalue prototype pollution vulnerability

1. devalue.parse allows __proto__ to be set

A string passed to devalue.parse could represent an object with a __proto__ property, which would assign a prototype to an object while allowing properties to be overwritten:

class Vector {
  constructor(x, y) {
    this.x = x;
    this.y = y;
  }

  get magnitude() {
    return (this.x ** 2 + this.y ** 2) ** 0.5;
  }
}

const payload = `[{"x":1,"y":2,"magnitude":3,"__proto__":4},3,4,"nope",["Vector",5],[6,7],8,9]`;

const vector = devalue.parse(payload, {
  Vector: ([x, y]) => new Vector(x, y)
});

console.log("Is vector", vector instanceof Vector); // true
console.log(vector.x) // 3
console.log(vector.y) // 4
console.log(vector.magnitude); // "nope" instead of 5

2. devalue.parse allows array prototype methods to be assigned to object

In a payload constructed with devalue.stringify, values are represented as array indices, where the array contains the 'hydrated' values:

devalue.stringify({ message: 'hello' }); // [{"message":1},"hello"]

devalue.parse does not check that an index is numeric, which means that it could assign an array prototype method to a property instead:

const object = devalue.parse('[{"toString":"push"}]');
object.toString(); // 0

This could be used by a creative attacker to bypass server-side validation.

Record
GHSA-vj54-72f3-p5jv
CVSS 4.0
7.9 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H
Weakness
CWE-1321
Updated
2026-11-02
NVD 7.9

Svelte devalue is a utility library. Prior to version 5.3.2, a string passed to devalue.parse could represent an object with a proto property and devalue.parse does not check that an index is numeric. This could result in assigning prototypes to objects and properties, leading to prototype pollution. This issue has been fixed in version 5.3.2

Record
CVE-2025-57820
CVSS 4.0
7.9 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Weakness
CWE-1321
Updated
2026-11-02
OSV 7.9

Svelte devalue vulnerable to prototype pollution

Svelte devalue is a utility library. Prior to version 5.3.2, a string passed to devalue.parse could represent an object with a proto property and devalue.parse does not check that an index is numeric. This could result in assigning prototypes to objects and properties, leading to prototype pollution. This issue has been fixed in version 5.3.2

Record
CVE-2025-57820
CVSS 4.0
7.9 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H
Weakness
CWE-1321
Updated
2026-11-02
OSVGHSA-vj54-72f3-p5jv 7.9

devalue prototype pollution vulnerability

1. devalue.parse allows __proto__ to be set

A string passed to devalue.parse could represent an object with a __proto__ property, which would assign a prototype to an object while allowing properties to be overwritten:

class Vector {
  constructor(x, y) {
    this.x = x;
    this.y = y;
  }

  get magnitude() {
    return (this.x ** 2 + this.y ** 2) ** 0.5;
  }
}

const payload = `[{"x":1,"y":2,"magnitude":3,"__proto__":4},3,4,"nope",["Vector",5],[6,7],8,9]`;

const vector = devalue.parse(payload, {
  Vector: ([x, y]) => new Vector(x, y)
});

console.log("Is vector", vector instanceof Vector); // true
console.log(vector.x) // 3
console.log(vector.y) // 4
console.log(vector.magnitude); // "nope" instead of 5

2. devalue.parse allows array prototype methods to be assigned to object

In a payload constructed with devalue.stringify, values are represented as array indices, where the array contains the 'hydrated' values:

devalue.stringify({ message: 'hello' }); // [{"message":1},"hello"]

devalue.parse does not check that an index is numeric, which means that it could assign an array prototype method to a property instead:

const object = devalue.parse('[{"toString":"push"}]');
object.toString(); // 0

This could be used by a creative attacker to bypass server-side validation.

Record
GHSA-vj54-72f3-p5jv
CVSS 4.0
7.9 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H
Weakness
CWE-1321
Updated
2026-11-02
OSVCLSA-2026-1774398079 No score

TuxCare security update for devalue (1 CVE)

TuxCare rebuilt devalue to address 1 CVE. Fixed in 4.3.3-tuxcare.1.

Record
CLSA-2026-1774398079
Updated
2026-11-02
OSVCLSA-2026-1786357331 No score

TuxCare security update for devalue (5 CVEs)

TuxCare rebuilt devalue to address 5 CVEs. Fixed in 4.3.2-tuxcare.1.

Record
CLSA-2026-1786357331
Updated
2026-11-02
OSVROOT-APP-NPM-CVE-2025-57820 No score

CVE-2025-57820 in @rootio/devalue - Patched by Root

Root has patched CVE-2025-57820 in the @rootio/devalue package for Root:npm. Multiple fixed versions available.

Record
ROOT-APP-NPM-CVE-2025-57820
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
devalue
npm
before 5.3.2
5.3.2
devalue
TuxCare:npm
4.3.3-tuxcare.0 up to 4.3.3-tuxcare.1, plus listed versions
4.3.3
4.3.3-tuxcare.1
devalue
TuxCare:npm
From an advisory covering 2 CVEs
4.3.2-tuxcare.0 up to 4.3.2-tuxcare.1, plus listed versions
4.3.2
4.3.2-tuxcare.1
@rootio/devalue
Root:npm
before 4.3.3-root.io.1
4.3.3-root.io.1
devalue
Root:npm
before 4.3.3-aikido.1
4.3.3-aikido.1

History

History
RecordedChangedSources
affected, facts
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2025-57820 is a high vulnerability (CVSS 7.9) in Sveltejs Devalue, published August 26, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.37%, the 31st percentile. Fixed in devalue 5.3.2.

References

MoveEnter Open