NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

CVE-2026-116580: Seroval: Deserialization invokes attacker-chosen callables: AsyncIteratorFactoryInstance calls source.on(listener) without type check

highCVSS 3.1 7.3GHSA-7rv5-mrxv-xcr9

seroval, the npm JavaScript serializer, has a deserialization flaw in `fromJSON`. A crafted payload can make the async iterator node call the `on` method of any value, including a callable returned by an application plugin. Apps that decode untrusted input with such plugins are exposed. All versions up to 1.6.7 are affected. Fixed in 1.6.8.

Published Oct 28, 2026 · Analysis Nov 1, 2026

What an attacker can do

When fromJSON rebuilds an async iterator, it takes a source value from the payload and calls source.on(listener). It never checked that the source was a seroval stream. An attacker can point the node at a different value, such as a function a plugin's deserialize returned, and the deserializer then calls that value's on method.

This is a variant of GHSA-mv8w-475r-vwqw. That earlier fix covered the promise and stream control nodes but not the async iterator node. Later releases (1.6.5 to 1.6.7) added a check by node type, but a payload can bypass it by reusing a node id.

The attacker needs only the ability to send a payload to code that passes it to fromJSON, which is why the vector is network, no privileges, no user interaction. The result depends on what your plugins return. If no plugin returns functions or objects with an on method, the exposure is small. If one does, the attacker triggers calls you did not intend, with effects up to the plugin's own capabilities. The CVSS score is 7.3 with low confidentiality, integrity and availability impact.

Who is affected

Every seroval version up to and including 1.6.7. Version 1.6.3 and earlier accept any value as the source. Version 1.6.4 rejects the reported payload. Versions 1.6.5 to 1.6.7 are bypassable. You are at real risk if you call fromJSON on untrusted input and register plugins whose deserialize returns functions or objects with an on method. Seroval is often a transitive dependency, so check the whole tree:

npm ls seroval

seroval

Ecosystem
npm
Affected
<= 1.6.7
Fixed in
1.6.8
Check
npm ls seroval

How to fix it

Upgrade to [email protected]. Streams and sequences are now internal class instances, and the deserializer checks the source with instanceof. Plain data and plugin values are rejected whatever node id the payload uses.

npm install [email protected]

For transitive copies, update the parent package or use your package manager's overrides. If you cannot upgrade yet, do not use plugins whose deserialize returns functions or objects with an on method when decoding untrusted input.

How to tell if you were hit

The advisory gives no log signature. Review where your code calls fromJSON on data from clients, then list the plugins registered for it and check whether any deserialize returns a function or an object with an on method. Inspect inbound payloads for async iterator nodes that reference a node id belonging to something other than a stream. Run npm ls seroval across your repos and lockfiles to find copies at 1.6.7 or lower.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

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.

Credited to cruzryan.

Questions

Is seroval 1.6.7 affected by CVE-2026-116580?

Yes. Versions 1.6.5 to 1.6.7 check the source by node type, and a payload can get around that by reusing a node id. Treat everything up to 1.6.7 as vulnerable and move to 1.6.8.

Does this need a plugin to be exploitable?

The reported attack uses a callable value returned by an application plugin. Without plugins that return functions or objects with an on method, the advisory describes no impact. Check your plugin list anyway, and upgrade.

Is CVE-2026-116580 exploited in the wild?

No source says so. It is not in CISA's KEV catalog, and the advisory reports no exploitation.

How is this related to GHSA-mv8w-475r-vwqw?

It is a variant. The earlier fix covered the promise and stream control nodes but left the async iterator node unchecked. Version 1.6.8 fixes it by checking with instanceof.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More npm vulnerabilities

All npm entries