GitHub Advisoryadvisory · npm
GHSA-8f34-f56x-9xph msgpack5: Truncated map32 headers throw an unexpected error
HIGH
Official page ↗
- Aliases
- CVE-2026-107302
- Ecosystem
- npm
- Packages
- msgpack5
- Severity
- High
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Weaknesses
- CWE-125
- Reviewed
- 2026-10-08
Affected packages
• npm msgpack5: >= 4.1.0, < 6.1.0 → fixed in 6.1.0
Description
Impact
A truncated `map32` header causes an out-of-bounds buffer read and throws `RangeError` instead of `IncompleteBufferError`. Applications that rely on `IncompleteBufferError` to wait for additional bytes may terminate a request, stream, or worker unexpectedly. No adjacent memory is disclosed because the buffer implementation checks bounds.
Patches
The decoder now validates the complete five-byte `map32` header before reading its length and reports truncated input as `IncompleteBufferError`.
Workarounds
Require at least five bytes before decoding a value beginning with `0xdf`, or catch `RangeError` and treat it as incomplete input only for truncated `map32` headers.
Related
Alias · CVE (1)
- CVE-2026-107302 msgpack5 is a msgpack v5 implementation for node.js and the browser. vulnerability
Weakness · CWE (1)
- CWE-125 Out-of-bounds Read weakness
References
- https://github.com/mcollina/msgpack5/security/advisories/GHSA-8f34-f56x-9xph web
- https://nvd.nist.gov/vuln/detail/CVE-2026-107302 advisory
- https://github.com/mcollina/msgpack5/commit/15443a1f2aa682a6aa37f1705ac628de5b866ad1 web
- https://github.com/mcollina/msgpack5 package
- https://github.com/mcollina/msgpack5/releases/tag/v6.1.0 web