Skip to main content
Vulnerability Database/CVE-2026-107296

CVE-2026-107296: msgpack5 Information Disclosure Flaw

CVE-2026-107296 is an information disclosure vulnerability in msgpack5 that causes data corruption when decoding negative 64-bit integers. This post covers technical details, affected versions, impact, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-107296 Overview

CVE-2026-107296 affects msgpack5, a MessagePack v5 implementation for Node.js and the browser. The vulnerability exists in versions prior to 6.1.0. When the decoder processes a negative signed 64-bit integer, it mutates the caller-provided input buffer while computing the result value. Applications that retain or reuse the encoded input for integrity checks, logging, auditing, or downstream processing can observe silently corrupted data. Positive integers and other MessagePack value types are not affected. The issue is classified as CWE-471: Modification of Assumed-Immutable Data. The maintainers addressed the flaw in version 6.1.0.

Critical Impact

Silent corruption of caller-owned input buffers during int64 decoding can invalidate integrity checks, audit logs, or any downstream consumer that assumes the encoded payload is immutable.

Affected Products

  • msgpack5 versions prior to 6.1.0
  • Node.js applications consuming msgpack5 for MessagePack decoding
  • Browser applications bundling msgpack5 for client-side decoding

Discovery Timeline

  • 2026-10-08 - CVE-2026-107296 published to NVD
  • 2026-10-14 - Last updated in NVD database

Technical Details for CVE-2026-107296

Vulnerability Analysis

The defect lives in the signed integer decoding path of msgpack5. When the decoder encounters an 8-byte signed integer, it invokes an internal helper to read a big-endian int64 value. The pre-patch implementation sliced the input buffer and then performed arithmetic that wrote back into the sliced view. Because Node.js Buffer.slice returns a view that shares memory with the parent buffer, the write operation propagated into the caller-provided input. Any consumer that later re-reads the original encoded bytes receives modified data. This breaks the common assumption that a decode operation is a pure, read-only transform over the input.

Root Cause

The root cause is improper handling of buffer aliasing combined with in-place arithmetic inside the int64 read helper. The decoder passed a sliced view of the input to readInt64BE, which performed mutating operations on the bytes it read. Because the slice shared the underlying ArrayBuffer with the caller's buffer, the mutation leaked outside the decoder boundary.

Attack Vector

Exploitation requires an attacker to supply a crafted MessagePack payload containing a negative int64 value to an application that decodes untrusted input and later relies on the raw encoded bytes. Scenarios include integrity verification against a stored copy, hash recomputation, replay to a secondary consumer, or forensic logging. The resulting integrity mismatch can bypass validation logic or produce misleading audit records. The attack is network-reachable but requires specific application-side behavior, which is why the CVSS impact is limited to integrity.

javascript
// Patch from msgpack5 commit 82b70393a824e1088a45a377548d1d9ab82faf91
// dist/msgpack5.js and lib/decoder.js
   if (size === 1) result = buf.readInt8(offset)
   if (size === 2) result = buf.readInt16BE(offset)
   if (size === 4) result = buf.readInt32BE(offset)
-  if (size === 8) result = readInt64BE(buf.slice(offset, offset + 8), 0)
+  if (size === 8) result = readInt64BE(buf, offset)
   return [result, size + 1]
 }

Source: GitHub Commit 82b7039. The fix removes the buf.slice() call and passes the original buffer with the correct offset, eliminating the aliased write that corrupted the caller's input.

Detection Methods for CVE-2026-107296

Indicators of Compromise

  • Mismatch between the hash of a received MessagePack payload and the hash recomputed after decoding.
  • Audit logs that record encoded payloads containing bytes inconsistent with the decoded int64 values.
  • Downstream consumers rejecting replayed MessagePack messages that previously validated successfully.

Detection Strategies

  • Perform a software composition analysis (SCA) scan of package.json and package-lock.json for msgpack5 versions below 6.1.0.
  • Add instrumentation around decode calls that compares a pre-decode hash of the input buffer against a post-decode hash to detect mutation.
  • Review code paths that both decode MessagePack data and subsequently reuse the raw input buffer for signing, hashing, or logging.

Monitoring Recommendations

  • Monitor dependency manifests in CI/CD for pinned or transitive msgpack5 versions below 6.1.0.
  • Track integrity-check failures in application telemetry, especially for pipelines that process signed MessagePack messages.
  • Alert on anomalous divergence between primary and secondary consumers of the same MessagePack payload.

How to Mitigate CVE-2026-107296

Immediate Actions Required

  • Upgrade msgpack5 to version 6.1.0 or later across all Node.js services and browser bundles.
  • Audit application code that retains the encoded input buffer after calling the decoder.
  • Invalidate any cached integrity checks or hashes computed over MessagePack buffers that were previously decoded with a vulnerable version.

Patch Information

The fix is published in msgpack5 release v6.1.0. The upstream commit 82b7039 replaces the sliced-buffer call with a direct offset read, preventing mutation of the caller's input. Full advisory details are available in GHSA-qw35-55vc-rhgj.

Workarounds

  • Pass a defensive copy of the input buffer to msgpack5 decode calls, for example decode(Buffer.from(input)), until the dependency is upgraded.
  • Recompute and compare integrity hashes before invoking the decoder rather than after, so the raw payload is validated against its original state.
  • Avoid reusing the same buffer instance for both decoding and downstream integrity or logging operations.
bash
# Upgrade msgpack5 to the patched release
npm install msgpack5@^6.1.0

# Verify the installed version
npm ls msgpack5

# Audit for known advisories
npm audit --production

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.