Advisory

GHSA-jp82-f5mq-hwhp

Also known as: CVE-2026-104845

Summary

Seroval: Memory exhaustion via unchecked TypedArray length in JSON deserialization

Details

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.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2026-10-05 23:40 UTC
Modified
2026-10-05 23:45 UTC

Affected packages and fixes

seroval

npm · All systems

Affected

  • introduced 0, fixed 1.6.3 (semver)

Fixed versions

1.6.3

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences