High · published January 13, 2026
⚡ A null pointer dereference is lurking in Ollama's image processing! When it tries to handle invalid image data, it can crash spectacularly — think of it as an overzealous chef tossing out a dish without checking if the ingredients were even good! 🍽️ Imagine a restaurant where the chef skips the quality check on ingredients. If a customer orders a dish with spoiled produce, the whole kitchen might crash with chaos! That's what happens here when Ollama processes a malformed image; it leads to a denial of service, making the whole service unavailable until it's rebooted. An attacker can exploit this by sending corrupt base64 image data to the /api/chat endpoint. This will lead to a segmentation fault, crashing the application and rendering it unavailable for all users. The downtime could severely impact service availability, causing frustration and potential loss of users.
Imagine a restaurant where the chef skips the quality check on ingredients. If a customer orders a dish with spoiled produce, the whole kitchen might crash with chaos! That's what happens here when Ollama processes a malformed image; it leads to a denial of service, making the whole service unavailable until it's rebooted. In Ollama versions 0.11.5-rc0 to 0.13.5, when processing base64-encoded image data, the application fails to validate the decoded content. If the input is invalid, the mtmd_helper_bitmap_init_from_buf function returns NULL, which is then dereferenced, leading to a crash.
An attacker can exploit this by sending corrupt base64 image data to the /api/chat endpoint. This will lead to a segmentation fault, crashing the application and rendering it unavailable for all users. The downtime could severely impact service availability, causing frustration and potential loss of users. To remediate this vulnerability, update to the latest version of Ollama where this issue has been fixed. Ensure proper validation of the decoded data before passing it to any processing functions. Additionally, consider implementing checks that prevent service crashes by handling NULL values safely. You can tackle this! Keep your service running smoothly by following these steps, and you'll be a security hero! 🦸♂️
| Product | Versions | Fixed in |
|---|---|---|
| ollama/ollama | ≥ 0.11.6, ≤ 0.13.5 | — |
| ollama/ollama | all versions | — |
| ollama/ollama | all versions | — |
| ollama/ollama | all versions | — |
| ollama/ollama | all versions | — |
| ollama/ollama | all versions | — |
| ollama/ollama | all versions | — |
| ollama/ollama | all versions | — |