Intel

AIKIDO-2026-806256

blosc2 is vulnerable to Use-After-Free

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

50

Medium Risk

This Affects:

PYTHONblosc2
2.0.0 - 4.8.0
Fixed in 4.8.1
Are you affected? Scan for Free

TL;DR

The schunk_from_cframe() and ndarray_from_cframe() helpers in core.py build objects whose data points directly into the caller's in-memory cframe bytes buffer when copy=False (the default), without keeping that buffer alive. A temporary cframe (for example ndarray_from_cframe(response.content)) can therefore be reclaimed while the returned object is still in use, so later reads dereference freed memory and return corrupted data. The related vlmeta read paths (__getitem__/__len__/__iter__) also dereference the raw C schunk pointer without the dead-owner check the write paths already had, segfaulting on an orphaned owner. The fix pins the source buffer on the returned object and makes vlmeta reads raise ReferenceError instead of crashing.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and construct objects from an in-memory cframe with copy=False (the default) without otherwise keeping the source buffer alive.

Background info

blosc2 is vulnerable to Use-After-Free in versions 2.0.0 - 4.8.0.

How to fix this

Upgrade the blosc2 library to the patch version.