GHSA-6v7p-g79w-8964: MessagePack for Python Out-of-bounds Read / Crash On Vulnerability

HIGH
CVSS 7.5
CWE-416
Published
Advisory Summary

GHSA-6v7p-g79w-8964 is a HIGH (CVSS 7.5) out-of-bounds read / crash on vulnerability (CWE-416: Use After Free) affecting MessagePack for Python libraries in the PyPI ecosystem. The issue involves out-of-bounds read / crash on unpacker reuse after a caught error. Remediation is available by upgrading affected packages to version 1.2.1.

GHSA-6v7p-g79w-8964 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-6v7p-g79w-8964
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-416: Use After Free
Affected Product MessagePack for Python
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix GHSA-6v7p-g79w-8964

To remediate this vulnerability, upgrade all affected MessagePack for Python dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

msgpack fixed: 1.2.1
pip install msgpack>=1.2.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show msgpack

How to Check if You Are Affected

To determine whether your Python environment is affected by GHSA-6v7p-g79w-8964, inspect your installed packages using pip:

pip show msgpack

Analyze the terminal output to locate any version of MessagePack for Python in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.1), your application is affected.

Note: The pip show msgpack command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-416: Use After Free, where the product reuses or references memory after it has been freed. at some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer. In MessagePack for Python, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact If the Unpacker is used repeatedly after an error occurs, the process may crash with a SEGV. If the Unpacker is used repeatedly to unpack untrusted input from external sources, it may be vulnerable to a DoS attack. ### Patches v1.2.1 ### Workarounds Users should create a new Unpacker instead of reusing the same Unpacker after an error occurs. Applying the above patch can prevent SEGV, but reusing the Streaming Unpacker after it has encountered an error will not yield correct data. If an error occurs during Streaming Unpacking, the Stream and Streaming Unpacker should be discarded. Therefore, this is not just a workaround but the correct solution. The above patch only prevents crashes from incorrect usage.

GHSA-6v7p-g79w-8964 Affected MessagePack for Python Versions

1 component(s)
Fixed Versions:
1.2.1
Product / Package Ecosystem Affected Versions Fixed Version
msgpack
PyPI
< 1.2.1
1.2.1

References

Frequently Asked Questions

What is GHSA-6v7p-g79w-8964?
GHSA-6v7p-g79w-8964 is a security vulnerability in MessagePack for Python involving Out-of-bounds read / crash on Unpacker reuse after a caught error under CWE-416: Use After Free.
Which MessagePack for Python versions are affected?
Affected versions include releases prior to 1.2.1 across affected packages: msgpack.
What version fixes GHSA-6v7p-g79w-8964?
Upgrading to 1.2.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is msgpack affected?
Yes, msgpack is affected in releases prior to 1.2.1. Upgrade your dependency to 1.2.1 or later.
What is the CVSS score of GHSA-6v7p-g79w-8964?
GHSA-6v7p-g79w-8964 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with GHSA-6v7p-g79w-8964?
GHSA-6v7p-g79w-8964 is classified under CWE-416: Use After Free (The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.).
How can I check PyPI dependencies for GHSA-6v7p-g79w-8964?
Run the dependency tree command: 'pip show msgpack'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-6v7p-g79w-8964",
  "modified" : "2026-06-19T21:42:55Z",
  "published" : "2026-06-19T21:42:55Z",
  "aliases" : [ ],
  "summary" : "MessagePack for Python: Out-of-bounds read / crash on Unpacker reuse after a caught error",
  "details" : "### Impact\n\nIf the Unpacker is used repeatedly after an error occurs, the process may crash with a SEGV.\n\nIf the Unpacker is used repeatedly to unpack untrusted input from external sources, it may be vulnerable to a DoS attack.\n\n### Patches\n\nv1.2.1\n\n### Workarounds\n\nUsers should create a new Unpacker instead of reusing the same Unpacker after an error occurs.\n\nApplying the above patch can prevent SEGV, but reusing the Streaming Unpacker after it has encountered an error will not yield correct data. If an error occurs during Streaming Unpacking, the Stream and Streaming Unpacker should be discarded.\n\nTherefore, this is not just a workaround but the correct solution. The above patch only prevents crashes from incorrect usage.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "msgpack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.2.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.2.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/msgpack/msgpack-python/security/advisories/GHSA-6v7p-g79w-8964"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/msgpack/msgpack-python/commit/2c56ddb5d0025ed481d962c0f5d62d19dec7476d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/msgpack/msgpack-python"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/msgpack/msgpack-python/releases/tag/v1.2.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-416" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-19T21:42:55Z",
    "nvd_published_at" : null
  }
}