MLX Heap Buffer Overflow Vulnerability in NumPy .npy File Parsing

Vulnerability

A heap buffer overflow vulnerability has been identified in MLX, an array framework for machine learning on Apple silicon, prior to version 0.29.4. The issue arises in the 'mlx::core::load()' function when the parser processes malicious NumPy .npy files. This vulnerability allows for a 13-byte out-of-bounds read, which can lead to a crash or potential information disclosure.

Impact

Exploitation of this vulnerability causes a heap buffer overflow, resulting in a crash and a possible 13-byte leak of heap memory.

Reproduction

The vulnerability can be reproduced by creating a malicious .npy file that exploits the buffer overflow. This can be done by crafting a file that includes a specially formatted header, which the MLX parser will read incorrectly, leading to an out-of-bounds memory access. The AddressSanitizer can be used to verify the heap-buffer-overflow error.

Remediation

Users should update to MLX version 0.29.4 or later, where this vulnerability has been patched.

Added: Nov 21, 2025, 7:19 PM
Updated: Nov 21, 2025, 7:19 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
5.0
exploitability
8.7
remediation
7.7
relevance
1.2
threat
6.4
urgency
2.9
incentive
5.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.