blosc2 is vulnerable to Use-After-Free
50
Medium Risk
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.
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.
blosc2 is vulnerable to Use-After-Free in versions 2.0.0 - 4.8.0.
Upgrade the blosc2 library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant