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

Source: https://junglewise.ai/threats/cve-2026-59940-seroval-type-confusion-in-fromjson-deserialization  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-18. Updated: 2026-07-24  
License: CC BY 4.0 with a link back

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)](https://junglewise.ai/threats/technologies/seroval). Vendors: [npm](https://junglewise.ai/threats/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

  ```sh
  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

- [https://api.github.com/users/mufeedvh](https://api.github.com/users/mufeedvh)
- [https://github.com/mufeedvh](https://github.com/mufeedvh)
- [https://api.github.com/users/mufeedvh/gists%7B/gist_id%7D](https://api.github.com/users/mufeedvh/gists%7B/gist_id%7D)
- [https://api.github.com/users/mufeedvh/repos](https://api.github.com/users/mufeedvh/repos)
- [https://avatars.githubusercontent.com/u/26198477?v=4](https://avatars.githubusercontent.com/u/26198477?v=4)
- [https://api.github.com/users/mufeedvh/events%7B/privacy%7D](https://api.github.com/users/mufeedvh/events%7B/privacy%7D)

## Related threats

- [Seroval denial of service via array-like object in deserialization](https://junglewise.ai/threats/cve-2026-116584-seroval-facilitates-javascript-value-stringification-including)
- [Seroval typed array constructor name injection](https://junglewise.ai/threats/cve-2026-116583-seroval-facilitates-javascript-value-stringification-including)
- [Seroval JavaScript RegExp code injection in HTML script elements](https://junglewise.ai/threats/cve-2026-116582-seroval-facilitates-javascript-value-stringification-including)
- [Seroval improper sequence node validation in deserialization](https://junglewise.ai/threats/cve-2026-116581-seroval-facilitates-javascript-value-stringification-including)
- [Seroval incomplete fix for AsyncIterator deserialization bypass](https://junglewise.ai/threats/cve-2026-116580-seroval-facilitates-javascript-value-stringification-including)
