CVE-2025-15514: Ollama Multi-Modal Model Image Processing NULL Pointer Dereference
Ollama 0.11.5-rc0 through current version 0.13.5 contain a null pointer dereference vulnerability in the multi-modal model image processing functionality. When processing base64-encoded image data via the /api/chat endpoint, the application fails to validate that the decoded data represents valid media before passing it to the mtmdhelperbitmapinitfrombuf function. This function can return NULL for malformed input, but the code does not check this return value before dereferencing the pointer in subsequent operations. A remote attacker can exploit this by sending specially crafted base64 image data that decodes to invalid media, causing a segmentation fault and crashing the runner process. This results in a denial of service condition where the model becomes unavailable to all users until the service is restarted.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Ollamato a version that resolves this vulnerability.Fixed in 0.13.5 - Configuration
Ensure the /api/chat handler validates that decoded base64 image data represents valid media before passing it to mtmd_helper_bitmap_init_from_buf, and handle malformed/invalid media inputs without dereferencing NULL pointers.
Ollama /api/chat image processing Decoded base64 image validation before mtmd_helper_bitmap_init_from_buf = enabled - Operational
Because the runner process crashes and the model is unavailable until restart, restart the Ollama service/runner after applying the fix so availability is restored.
Event History
Frequently Asked Questions
What is the severity of CVE-2025-15514?
CVE-2025-15514 has a severity rating that indicates a significant risk due to the null pointer dereference vulnerability.
How do I fix CVE-2025-15514?
To fix CVE-2025-15514, update the Ollama software to a version above 0.13.5 which has addressed this vulnerability.
What versions are affected by CVE-2025-15514?
CVE-2025-15514 affects Ollama versions from 0.11.5-rc0 to 0.13.5.
What endpoint is vulnerable in CVE-2025-15514?
The /api/chat endpoint is vulnerable in CVE-2025-15514 when processing base64-encoded image data.
What type of vulnerability is CVE-2025-15514?
CVE-2025-15514 is a null pointer dereference vulnerability related to multi-modal model image processing.