GHSA-jp82-f5mq-hwhp: High severity npm/seroval vulnerability

Published Oct 5, 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.

Affected Software

1 affected componentFixes available
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. Compensating control

    In deserializeTypedArray and fromCrossJSON, validate that the source is an ArrayBuffer at runtime before casting, enforce a maximum element/allocation size, and apply the same unchecked-cast validation and size cap to the DataView path.

Event History

Oct 5, 2026
Advisory Published
via GitHub·11:40 PM
Data Sourced
via GitHub·11:40 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are exposed?

Services that deserialize untrusted Seroval JSON through fromJSON or fromCrossJSON are exposed. The described impact is unauthenticated CPU and memory exhaustion; confidentiality and integrity are not affected.

2

What does an attacker need to exploit this?

An attacker needs to supply crafted JSON that reaches the affected deserialization functions. A small payload containing a plain object with a chosen integer length can request an arbitrarily large TypedArray allocation.

3

Why does the existing offset validation not prevent exploitation?

For a plain object, source.byteLength is undefined, causing the offset comparison to evaluate false. Processing then reaches the array-like TypedArray constructor rather than rejecting the input.

4

What can be done if patching is not immediately possible?

Where application code controls deserialization inputs, reject sources that are not ArrayBuffer instances and enforce a maximum permitted element count before constructing a TypedArray. Restricting untrusted data from reaching fromJSON and fromCrossJSON also removes the described attack path.

5

How can I identify an affected use case?

Review whether untrusted JSON is passed to Seroval's fromJSON or fromCrossJSON and whether the input can represent typed-array data. Inputs containing a plain object with a length property are relevant to the described allocation path.

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