CVE-2026-59940: Seroval type confusion in fromJSON deserialization

CVE-2026-59940 · Severity: critical · CVSS 9.8 · Published 2026-08-18

Seroval is a library used to serialize and deserialize complex JavaScript data structures. A vulnerability in its data processing allows an attacker to send specially crafted data that triggers unintended actions on the server. This can lead to unauthorized code execution or complete server compromise, especially when used in frameworks like TanStack Start.

Technologies: seroval (npm). Vendors: npm.

Quick answers

Is CVE-2026-59940 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-59940 being exploited in the wild.
How severe is CVE-2026-59940?
Critical severity, with a CVSS score of 9.8, published 18 August 2026.
Which products and versions are affected?
seroval (npm) <= 1.5.2, SEMVER:introduced=0,fixed=1.5.3.
Is there a fix for CVE-2026-59940?
Yes. seroval (npm): upgrade to 1.5.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-59940 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-59940?
Check whether you run seroval (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

  • seroval (npm): upgrade to 1.5.3 or later
    npm install seroval@1.5.3

Technical details

A type confusion vulnerability exists in the `seroval.fromJSON()` API due to insufficient verification of Promise resolver records. During deserialization, attacker-controlled JSON input can cause Promise control nodes to operate on values from the general reference table as if they were internal resolver records. If plugins are enabled—particularly those that return callable wrappers—an attacker can trigger unintended server-side function invocations. This primitive can be escalated to remote code execution (RCE) depending on the application's exposed functionality and registered plugins. The issue is fixed in version 1.5.3.

Affected products

  • lxsmnsyc seroval <= 1.5.2

Identifiers

  • CVE-2026-59940
  • GHSA-mv8w-475r-vwqw

Timeline

  • 2026-07-08: disclosed: Initial publication by lxsmnsyc/seroval
  • 2026-07-24: advisory: GitHub Advisory published
  • 2026-07-24: patched: Fix confirmed in version 1.5.3

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.