CVE-2026-104845: Seroval: Memory exhaustion via unchecked TypedArray length in JSON deserialization

Published Oct 2, 2026
·
Updated

Summary

deserializeTypedArray casts the source node to ArrayBuffer without checking it and never bounds the element count. Pass a plain object with a length property and it hits the array-like TypedArray constructor, allocating that many elements. The offset guard above it can't stop this: source.byteLength is undefined, so the comparison is always false.

The length is one integer in the JSON, so a tiny payload can name any allocation size, and it runs synchronously inside fromJSON, starving the event loop instead of just slowing one request. fromCrossJSON is the same.

Impact is unauthenticated CPU/memory exhaustion for any service deserializing untrusted Seroval JSON: same profile as the array-length and nested-depth DoS issues already fixed here. No confidentiality or integrity impact. DataView has the same unchecked cast but throws instead of allocating. A runtime instanceof ArrayBuffer check plus a size cap should fix it.

Other sources

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.

— MITRE

Affected Software

2 affected componentsFixes available
npm/seroval<1.6.3
npm/seroval<=1.6.2
1.6.3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/seroval to a version that resolves this vulnerability.

    Fixed in 1.6.3
  2. Upgrade

    Upgrade Seroval to a version that resolves this vulnerability.

    Fixed in 1.6.3

Event History

Oct 2, 2026
CVE Published
via MITRE·03:55 PM
Data Sourced
via MITRE·03:55 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:16 PM
DescriptionSeverityWeakness
Oct 5, 2026
Advisory Published
via GitHub·11:40 PM
Data Sourced
via GitHub·11:40 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

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.

2

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.

3

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.

4

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203