GitHub Advisoryadvisory · npm
GHSA-7rv5-mrxv-xcr9 Seroval: Deserialization invokes attacker-chosen callables: AsyncIteratorFactoryInstance calls source.on(listener) without type check
HIGH
Official page ↗
- Aliases
- CVE-2026-116580
- Ecosystem
- npm
- Packages
- seroval
- Severity
- High
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- Weaknesses
- CWE-502
- Reviewed
- 2026-10-28
Affected packages
• npm seroval: < 1.6.8 → fixed in 1.6.8
Description
Summary
When `fromJSON` rebuilt an async iterator, it called `on()` on the iterator's source without checking that the source was a seroval stream. A crafted payload could pick another value as the source, such as a function returned by an application plugin. The deserializer then called that value's `on` method.
This is a variant of GHSA-mv8w-475r-vwqw. That fix covered the promise and stream control nodes but not the async iterator node.
Impact
An application that passes untrusted input to `fromJSON` with plugins that return callable values can have those callables invoked during deserialization. What this allows depends on what the plugin's values do.
Affected versions
• Versions up to 1.6.3 accept any value as the source.
• 1.6.4 rejects the reported payload.
• 1.6.5 to 1.6.7 check the source by node type, which a payload can get around by reusing a node id.
• All versions up to 1.6.7 should be treated as affected.
Patches
Fixed in `[email protected]`. Streams and sequences are now internal class instances. The deserializer checks the source value with `instanceof`, so plain data and plugin values are rejected no matter which node id they use.
Workarounds
Avoid plugins whose `deserialize` returns functions or objects with an `on` method when decoding untrusted input. Upgrading to 1.6.8 is recommended.
Related
Alias · CVE (1)
- CVE-2026-116580 Seroval facilitates JavaScript value stringification, including complex structures beyond JSON.stringify capabilities. vulnerability
Weakness · CWE (1)
- CWE-502 Deserialization of Untrusted Data weakness
References
- https://github.com/lxsmnsyc/seroval/security/advisories/GHSA-7rv5-mrxv-xcr9 web
- https://nvd.nist.gov/vuln/detail/CVE-2026-116580 advisory
- https://github.com/lxsmnsyc/seroval/commit/3edc78b495ea0d6bd498143e5b3e56996607c5f2 web
- https://github.com/lxsmnsyc/seroval/commit/50926b3ee198fb757e6ce3aa70efeed38d931c8d web
- https://github.com/lxsmnsyc/seroval package
- https://github.com/lxsmnsyc/seroval/releases/tag/[email protected] web