CVE-2026-59940

CVE-2026-59940 is a critical-severity insecure deserialization vulnerability in seroval (npm), affecting versions <= 1.5.2. It is fixed in 1.5.3.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

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

A type confusion issue in seroval.fromJSON() allowed attacker-controlled JSON input to cause Promise control nodes to operate on values from the general deserialization reference table without first verifying that those values were genuine internal promise resolver records.

In applications that deserialize untrusted Seroval JSON with plugins enabled, this could allow attacker-controlled deserialization side effects. In downstream server frameworks that register plugins returning callable wrappers, this primitive could become unintended server-side invocation and, depending on exposed application functionality, remote code execution or equivalent server compromise.

The issue was fixed in [email protected].

Affected package

  • Package: seroval
  • Affected API: fromJSON()
  • Affected versions: versions prior to 1.5.3 that contain the vulnerable Promise resolver reference handling
  • Patched version: 1.5.3

Fix verification

The original private reproducer was verified against [email protected] and no longer reproduces against [email protected].

Validation results:

Credit

Reported by Mufeed VH from Winfunc Research.

Disclosure / coordination note

The downstream TanStack Start impact was coordinated privately. Technical exploit details and proof-of-concept reproduction material have been omitted from this advisory draft for discretion.

Impact

The vulnerable deserialization path could confuse attacker-created values in the general reference table with Seroval's internal promise resolver records.

Direct impact in seroval is a deserialization side-effect primitive when untrusted JSON is deserialized with plugins enabled. Downstream impact depends on registered plugins and framework usage. If a downstream framework registers plugins that deserialize sensitive callable wrappers, attacker-controlled input may be able to trigger unintended server-side invocation during deserialization.

A concrete downstream impact scenario was validated privately against TanStack Start before the 1.5.3 fix. With [email protected], the downstream reproducer no longer succeeds.

Untrusted serialized data is processed by a deserializer that can instantiate arbitrary objects or execute code as a side effect. Typical impact: arbitrary code execution or logic abuse.

CVE-2026-59940 has a CVSS score of 9.8 (Critical). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.5.3); upgrading removes the vulnerable code path.

Affected versions

seroval (<= 1.5.2)

Security releases

seroval → 1.5.3 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade to [email protected] or later.

Downstream projects that accept Seroval JSON from untrusted clients should also consider defense-in-depth controls:

  • restrict accepted Seroval node types for client-to-server payloads;
  • allowlist plugin tags for inbound deserialization;
  • avoid registering plugins that produce callable or privileged values for untrusted inputs unless strictly necessary;
  • add regression tests ensuring deserialization cannot cause unintended server-side invocation as a side effect.

Frequently Asked Questions

  1. What is CVE-2026-59940? CVE-2026-59940 is a critical-severity insecure deserialization vulnerability in seroval (npm), affecting versions <= 1.5.2. It is fixed in 1.5.3. Untrusted serialized data is processed by a deserializer that can instantiate arbitrary objects or execute code as a side effect.
  2. How severe is CVE-2026-59940? CVE-2026-59940 has a CVSS score of 9.8 (Critical). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of seroval are affected by CVE-2026-59940? seroval (npm) versions <= 1.5.2 is affected.
  4. Is there a fix for CVE-2026-59940? Yes. CVE-2026-59940 is fixed in 1.5.3. Upgrade to this version or later.
  5. Is CVE-2026-59940 exploitable, and should I be worried? Whether CVE-2026-59940 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-59940 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-59940? Upgrade seroval to 1.5.3 or later.

Other vulnerabilities in seroval

Stop the waste.
Protect your environment with Kodem.