Intel

AIKIDO-2026-342228

msgpack is vulnerable to Use-After-Free

Use-After-Free Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published 5 days ago

48

Medium Risk

This Affects:

PYTHONmsgpack
0.5.0 - 1.2.1
Fixed in 1.2.2
Are you affected? Scan for Free

TL;DR

The unpackb() function copies non-contiguous input, such as a sliced memoryview, into a temporary contiguous buffer before parsing. When the input contains trailing bytes after a complete object, the trailing ExtraData payload is read from that temporary buffer after it has already been released, so the exception is built from freed memory. This can expose unrelated freed heap contents through the returned extra bytes or crash the interpreter. The fix copies the extra data out before the temporary buffer is released.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you unpack untrusted or externally influenced data passed as a non-contiguous buffer such as a sliced memoryview that carries trailing bytes after a complete object.

Background info

msgpack is vulnerable to Use-After-Free in versions 0.5.0 - 1.2.1.

How to fix this

Upgrade the msgpack library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform