CVE-2026-116581 (GHSA-97r2-qh9m-474h) is a denial-of-service vulnerability in the seroval npm package's fromJSON/fromCrossJSON deserializers. The root cause is that the deserializer trusted two categories of node-supplied fields without validation:
-
Array element lists: Several deserializer functions read node.a (or node.k/node.v/node.e.k/node.e.v) and used .length to drive allocation and iteration. Because the input was not checked to be a genuine array, an attacker could supply a plain object like {"length": 1e9} or {"length": "Infinity"}, causing the decoder to allocate a huge array and loop billions of times (or loop on an unreachable exit condition), blocking the event loop. This is fixed in commit cdcee3e3bc384ee844360844f8ea98fd2b275d69 by adding a validateNodeList guard (which throws SerovalMalformedNodeError when the list is not an Array) to deserializeArray, deserializeProperties, deserializeSet, deserializeMap, and deserializeStreamConstructor.
-
Sequence indices: deserializeSequence passed the node-supplied s (throw index) and l (done index) directly into createSequence([], node.s, node.l). The generated iterator (via ITERATOR_CONSTRUCTOR in constructors.ts) only terminates when index > sequence.d (the done index). A crafted done index (non-integer, negative beyond -1, or out of range) produced an iterator whose next() never returns done: true, so any code reading the iterator to completion runs forever. This is fixed in commit e176f9267e59ddd6c9de89cc9fe85c5b37a5b728 by adding isSequenceIndex validation (integer from -1 up to the last element index) and validateNodeList.
The vulnerable functions are the deserializer functions that were modified by these two patches to add the missing validation. These are the functions that would appear in a runtime profile/stack trace when the vulnerability is triggered: (array DoS), (infinite iterator), and the other list-consuming functions , , , and . Since this is a TypeScript/JavaScript library, profilers show function names without namespace/module paths (the functions are module-local, not class methods).