CVE-2026-104845: Seroval: Memory exhaustion via unchecked TypedArray length in JSON deserialization
Seroval facilitates JS value stringification, including complex structures beyond JSON.stringify capabilities. Prior to 1.6.3, deserializeTypedArray in fromJSON and fromCrossJSON trusts a deserialized source value as an ArrayBuffer and does not bound the serialized element count. An attacker can provide a small untrusted JSON object with a large length value, causing the array-like TypedArray constructor to synchronously allocate the selected number of elements and exhaust CPU or memory while starving the event loop. The offset check does not reject the crafted source because source.byteLength is undefined. DataView reaches a similar unchecked cast but throws rather than allocating, and the issue has no identified confidentiality or integrity impact. This issue is fixed in version 1.6.3.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Serovalto a version that resolves this vulnerability.Fixed in 1.6.3
Event History
Frequently Asked Questions
What conditions are required for exploitation?
An attacker needs to supply a crafted, untrusted JSON object to Seroval's fromJSON or fromCrossJSON deserialization path. No authentication or user interaction is required according to the supplied severity vector.
Which deserialization targets are affected?
The issue affects deserializeTypedArray when processing TypedArray data through fromJSON and fromCrossJSON before version 1.6.3. DataView reaches a related unchecked cast but throws instead of allocating memory.
What is the practical impact?
A small malicious JSON payload can declare a very large element count, causing synchronous CPU or memory exhaustion and starving the event loop. No confidentiality or integrity impact has been identified.
What should be done if untrusted serialized input is accepted?
Upgrade Seroval to version 1.6.3. Until upgrading, avoid passing untrusted JSON or CrossJSON data to the affected deserialization functions.