All vulnerabilities

PyPI

CVE-2026-114613

MessagePack: Unbounded memory leak in msgpack C extension on strict_map_key validation failure

Severity
High 7.5
Published
27 Oct 2026
Last changed
27 Oct 2026
Added to UpHeron
23 Nov 2026
Fixed in
1.2.3
Exploit chance
0.5% in the next 30 daysHigher than 46% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Memory leak (CWE-401)Use after free (CWE-416)
Attack
Over the network · No login needed · No user action needed
Attacker can
Take it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Also known as
GHSA-j586-36cw-2gc2
Sources
OSV.dev and GitHub

Description

The msgpack-python C extension (msgpack._cmsgpack) leaks a decoded map value when deserialization rejects a key with strict_map_key=True (the default). Repeated malformed inputs can cause unbounded process memory growth and denial of service in applications that deserialize attacker-controlled MessagePack data. Both unpackb() and the streaming Unpacker API are affected. The pure-Python fallback does not exhibit this leak in the reported tests.

The report measured approximately 4 MiB retained per failed parse and 100 MiB after 25 failed parses on Windows with Python 3.14 and msgpack 1.2.2. These are reporter-provided results.

In msgpack/unpack.h, unpack_callback_map_item() rejects keys that are neither str nor bytes. At this point the map value has already been constructed. The early error return does not release the value reference.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Workarounds

The pure-Python fallback is reported not to leak on this path and may be used as a temporary workaround after application compatibility and performance checks. Request-size and rate limits may reduce the impact but do not eliminate cumulative leakage.

Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
msgpackPyPI · osv:PyPI:msgpack
  • Every version before 1.2.3

About msgpack

Weekly downloads (PyPI)
56,383,709PyPI Stats, 23 Nov 2026

This is the only vulnerability in msgpack in our list.

References