CVE-2026-59940 seroval: `seroval.fromJSON()` Promise resolver type confusion invokes attacker-controlled methods during deserialization

Critical 9.8 Published Updated

Attacker-controlled JSON can trigger unintended method invocations during deserialization, potentially leading to remote code execution in applications using seroval with plugins.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-59940?

CVE-2026-59940 is a critical unsafe deserialization vulnerability in lxsmnsyc seroval, published on 18 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Seroval facilitates JS value stringification, including complex structures beyond JSON.stringify capabilities. Prior to 1.5.3, seroval.fromJSON() allows attacker-controlled JSON Promise control nodes to operate on values from the general deserialization reference table without verifying genuine internal Promise resolver records, causing deserialization side effects with plugins enabled and potentially unintended server-side invocation or remote code execution when downstream frameworks register callable wrappers. This issue is fixed in version 1.5.3.

Weakness: CWE-843, CWE-502

Which versions are affected by CVE-2026-59940?

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

PackageAffectedFixed in
seroval npmAll versions1.5.3
seroval npmAll versions1.5.3

How do I fix CVE-2026-59940?

Upgrade seroval to 1.5.3 or later.

Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.

Is CVE-2026-59940 being exploited?

There is no known exploitation of CVE-2026-59940 in the wild and no public exploit code.

Sources

Also known as GHSA-mv8w-475r-vwqw, ROOT-APP-NPM-CVE-2026-59940.

Is CVE-2026-59940 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free