msgpack-python: Memory leak and use-after-free vulnerability (CVE-2026-114613)
The msgpack-python C extension contains a memory leak and a reference count corruption vulnerability triggered during deserialization of malformed data, enabling denial of service and potential memory safety issues.
CVE search metadata
CVE search record: CVE-2026-114613. Severity: high. CVSS: 7.5. EPSS: 0.44%. KEV: no. Product: msgpack-python (< 1.2.3). Brief: msgpack-python: Memory leak and use-after-free vulnerability (CVE-2026-114613). Brief link: https://feed.craftedsignal.io/briefs/2026-10-msgpack-memory-leak/
Triage facts
Revision 1- Applicability
- msgpack-python (< 1.2.3)
- Evidence
- Unknown
- Severity
- Low
- Action
- Elevated
- Sources
- 1 public source
- Freshness
- Revision 1Oct 27, 17:57 UTC
- Vulnerabilities
- 1 CVE
- Source quality
- B2Roughly even chance
The msgpack-python C extension (msgpack._cmsgpack) is vulnerable to an unbounded memory leak when deserializing MessagePack data that fails strict_map_key validation. The vulnerability occurs because the C extension fails to release references to constructed map values when a key is rejected. This can be exploited to cause a denial of service via memory exhaustion.
Additionally, an audit identified a use-after-free condition in the streaming Unpacker API. Stale references to objects in the parser stack can lead to incorrect reference count decrements (double Py_DECREF) if parsing fails after a nested container is processed. This can result in application crashes or memory corruption. Both vulnerabilities are tracked under CVE-2026-114613.
Impact
- Memory Leak: Observed retention of approximately 4 MiB of memory per failed parse, leading to rapid process memory growth and potential service instability.
- Memory Safety: The reference count corruption in the streaming API may lead to unpredictable application behavior, crashes, or use-after-free vulnerabilities.
Recommendation
- Upgrade
msgpackto version 1.2.3 or later immediately to address the memory leak and reference count corruption. - If immediate patching is not possible, evaluate the use of the pure-Python implementation of
msgpack, which is reported not to exhibit this specific leak, though it may have performance implications. - Implement strict request-size and request-rate limiting at the application or WAF level for endpoints that accept MessagePack data to mitigate the impact of malicious inputs on memory utilization.
Immediate actions
Upgrade msgpack-python dependency to 1.2.3 or later
Threat Hunt
Monitor application process memory usage for rapid or anomalous growth during periods of high ingestion of MessagePack-serialized data
Data: Application process memory metrics (Resident Set Size)
Mitigations
Upgrade msgpack-python to 1.2.3
CVE-2026-114613
Gaps
- Lack of application-level logs indicating specific MessagePack deserialization failure patterns for the vulnerable endpoints.