CVE-2026-57585: MessagePack Out-of-Bounds Read / DoS Vulnerability
MessagePack, a popular serialization library for Python, contains a defect in how it handles repeated use of the Unpacker object after an error occurs. When an Unpacker instance encounters a parsing error and is then reused to process more data, it can read from invalid memory locations, causing the process to crash. This denial-of-service condition affects applications that parse untrusted MessagePack data in a loop or that implement retry logic without properly reinitializing the Unpacker. The vulnerability is resolved in version 1.2.1 and later.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.5 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Weaknesses (CWE)
- CWE-416
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-30 / 2026-08-06
NVD description (verbatim)
MessagePack is the serializer implementation for Python msgpack.org. Prior to 1.2.1, there is an Out-of-bounds read/crash on Unpacker reuse after a caught error, potentially leading to a DoS attack. If the Unpacker is used repeatedly after an error occurs, the process may crash with a SEGV. This issue has been fixed in version 1.2.1.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-57585 is an out-of-bounds read vulnerability in the MessagePack Python library stemming from improper state management in the Unpacker class. When deserialization fails and raises an exception, the Unpacker's internal buffer pointers and state flags are not correctly reset. Subsequent calls to unpack data using the same Unpacker instance cause reads beyond allocated memory boundaries, triggering a segmentation fault. This maps to CWE-416 (Use After Free), as the underlying mechanism involves accessing freed or deallocated memory regions within the deserialization context. The issue manifests only when the Unpacker is reused after catching an exception, making certain application patterns more vulnerable than others.
Business impact
Applications relying on MessagePack for data deserialization—including those handling API responses, distributed system communication, or streaming protocols—face availability risks. A remote attacker can craft malformed MessagePack payloads that, when processed by a vulnerable Unpacker instance in a loop or event handler, cause application crashes. This enables denial-of-service attacks without requiring authentication or special privileges. For services that automatically retry failed deserializations or batch-process untrusted data, exploitation requires minimal effort and can disrupt availability with moderate operational impact.
Affected systems
The vulnerability affects msgpack-python (the official MessagePack library for Python) in all versions prior to 1.2.1. Any application using this library to deserialize untrusted data is potentially affected. Common use cases include web services consuming JSON-serialized alternatives or protocol handlers in microservices architectures, message brokers, and data processing pipelines. The impact is amplified in long-running processes (daemons, services) where the same Unpacker object is reused across multiple requests or messages.
Exploitability
Exploitation requires only network access to transmit a malformed MessagePack payload to a vulnerable application. No authentication, user interaction, or special system privileges are required. The CVSS score of 7.5 (HIGH) reflects the ease of triggering a denial-of-service condition via unauthenticated network input. However, successful exploitation depends on the target application's deserialization pattern: services that create a fresh Unpacker per message are not vulnerable, while those that reuse a single instance across multiple messages are at risk. Proof-of-concept development is straightforward for an attacker with basic MessagePack format knowledge.
Remediation
Upgrade msgpack-python to version 1.2.1 or later. This release includes fixes for the Unpacker state initialization issue, ensuring that error conditions properly reset internal buffers and flags. Additionally, applications may reduce exposure by creating a new Unpacker instance for each message or by implementing per-message deserialization scope rather than maintaining a long-lived Unpacker object. Organizations should prioritize patching production systems, particularly those handling untrusted or adversary-controlled MessagePack data.
Patch guidance
Consult the official msgpack-python release notes to confirm the patched version for your environment. Version 1.2.1 and later are safe. Update via your standard package management tool (pip, conda, or distribution repositories). For organizations using vendored or bundled versions of MessagePack, verify that the package version has been updated to 1.2.1 or later. Test the patched version in a staging environment to confirm compatibility with your application's deserialization workflows before deploying to production.
Detection guidance
Monitor application logs and system error logs for segmentation faults (SIGSEGV) or process crashes occurring immediately after MessagePack deserialization errors. Use intrusion detection or network monitoring to identify suspicious MessagePack payloads that deviate from normal schema patterns. Implement application-level logging to track Unpacker reuse patterns: log when an Unpacker instance is created, when errors occur during unpacking, and when the same instance is reused afterward. In development and testing, use sanitizers (AddressSanitizer, MemorySanitizer) to detect out-of-bounds memory access before deployment.
Why prioritize this
This vulnerability merits prompt patching due to its combination of high accessibility (unauthenticated network attack vector), ease of exploitation, and denial-of-service impact. Services that are performance-critical or mission-essential and rely on MessagePack for data handling should be prioritized. Additionally, any application exposing a MessagePack endpoint to untrusted or public networks is at elevated risk. While not as critical as memory corruption vulnerabilities that enable arbitrary code execution, the ability to trigger reliable crashes with minimal effort and no prerequisites makes this a significant availability threat.
Risk score, explained
The CVSS 3.1 score of 7.5 reflects a HIGH severity vulnerability. The vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H breaks down as: network-accessible (AV:N), low attack complexity (AC:L), no privileges required (PR:N), no user interaction (UI:N), impact confined to the affected system (S:U), and high availability impact (A:H). The absence of confidentiality or integrity impact (C:N, I:N) reflects that crashes do not leak data or corrupt application state; however, the trivial exploitability and guaranteed availability disruption justify the HIGH classification.
Frequently asked questions
Can this vulnerability be exploited remotely without sending data directly to MessagePack?
No; the vulnerability requires MessagePack deserialization of attacker-controlled input. However, any network service that parses MessagePack—whether directly via API or indirectly through protocol handlers—is potentially vulnerable if it reuses an Unpacker instance across requests.
Does upgrading to 1.2.1 require application code changes?
No. Upgrading the library itself is sufficient. Existing applications will automatically benefit from the fixed Unpacker behavior. However, reviewing your codebase to identify and refactor long-lived Unpacker instances is a good defensive practice.
If our application creates a new Unpacker for each message, are we safe?
Yes. Applications that instantiate a new Unpacker object for each deserialization operation are not vulnerable because the state corruption only manifests when a single Unpacker instance is reused after an error. That said, upgrading is still recommended to stay current with security patches.
What should we do if we cannot upgrade immediately?
As a temporary mitigation, redesign your deserialization flow to avoid reusing Unpacker instances. Create a fresh Unpacker for each message or use alternative serialization libraries that do not exhibit this flaw. Monitor for suspicious MessagePack payloads and crashes, and plan an upgrade as soon as feasible.
This analysis is provided for informational purposes to assist security professionals in vulnerability assessment and remediation planning. All information is derived from official CVE records and vendor advisories. Organizations should verify patch applicability and compatibility with their environments before deployment. No exploit code or weaponization guidance is included. Always consult the official msgpack-python repository and vendor security advisories for authoritative guidance. Source: NVD (public-domain), retrieved 2026-08-09. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2025-60464HIGHGPAC MP4Box Use-After-Free DoS Vulnerability
- CVE-2025-60467HIGHGPAC MP4Box Use-After-Free DoS Vulnerability
- CVE-2026-0125HIGHAndroid VPU Race Condition Local Privilege Escalation
- CVE-2026-0137HIGHAndroid Edge TPU Use-After-Free Privilege Escalation
- CVE-2026-0143HIGHAndroid LWIS Use-After-Free Privilege Escalation (CVSS 7.8 HIGH)
- CVE-2026-10000HIGHChrome Sandbox Escape via Use-After-Free in Password Handling
- CVE-2026-10001HIGHChrome Sandbox Escape via PerformanceManager Use-After-Free
- CVE-2026-10002HIGHGoogle Chrome PDFium Use-After-Free Vulnerability (CVSS 8.8)