Executive brief
MLX is a machine learning framework for Apple silicon. A vulnerability in its GGUF file loading component allows a malicious model file to crash the application. This could lead to a denial-of-service if a user or automated system attempts to process an untrusted machine learning model.
Technical details
A NULL pointer dereference (CWE-476) exists in `mlx/io/gguf.cpp` within the `extract_tensor_data()` function. The vulnerability occurs because the `weights_data` pointer, provided by the external `gguflib` library, is passed directly to `memcpy` without validation. An attacker can provide a specially crafted GGUF file that results in a NULL pointer for tensor weights, leading to a segmentation fault and application crash. This issue is fixed in version 0.29.4 by adding explicit checks for the `weights_data` pointer.
Affected products
- ml-explore mlx <= 0.29.3
Timeline
- 2025-11-21: disclosed
- 2025-11-21: advisory
- 2025-11-21: patched: Fixed in version 0.29.4