MLX has Wild Pointer Dereference in load_gguf()
Description
MLX is an array framework for machine learning on Apple silicon. Prior to version 0.29.4, there is a segmentation fault in mlx::core::load_gguf() when loading malicious GGUF files. Untrusted pointer from external gguflib library is dereferenced without validation, causing application crash. This issue has been patched in version 0.29.4.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
MLX before 0.29.4 crashes on malicious GGUF files due to an untrusted pointer dereference in load_gguf(), enabling denial of service.
Vulnerability
Overview
CVE-2025-62609 describes a segmentation fault in the MLX array framework for Apple silicon, specifically in the mlx::core::load_gguf() function when processing a malicious GGUF file. The root cause lies in the extract_tensor_data() function within mlx/io/gguf.cpp. The function retrieves a pointer (tensor->weights_data) from the external gguflib library and passes it directly to memcpy without any validation. If the pointer is invalid or points to an inaccessible memory region, the operation triggers a segmentation fault, crashing the application [1][2].
Exploitation
An attacker can exploit this vulnerability by crafting a specially designed GGUF file that contains an invalid or null weights_data pointer. No authentication or special privileges are required; the victim only needs to load the malicious file using MLX's mx.load() function with the format='gguf' argument. The crash occurs immediately upon parsing the file, making it a straightforward denial-of-service vector [1][2].
Impact
The primary impact is a denial of service (application crash). The advisory does not indicate that arbitrary code execution or data corruption is possible; the vulnerability is limited to causing the MLX process to terminate unexpectedly. This can disrupt workflows that rely on loading untrusted GGUF files, such as when processing user-supplied models in a server or research environment [1][2].
Mitigation
The issue has been patched in MLX version 0.29.4. Users are strongly advised to upgrade to this version or later. The fix adds a null-pointer check before dereferencing tensor->weights_data, throwing a runtime error instead of crashing. No workarounds are documented; the safest mitigation is to update the library [1][2].
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
mlxPyPI | < 0.29.4 | 0.29.4 |
Affected products
1- ml-explore/mlxv5Range: < 0.29.4
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
3- github.com/advisories/GHSA-j842-xgm4-wf88ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-62609ghsaADVISORY
- github.com/ml-explore/mlx/security/advisories/GHSA-j842-xgm4-wf88ghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.