Ollama: Use of NullPointerException Catch to Detect NULL Pointer Dereference
CVE-2025-15514 is a high-severity use of nullpointerexception catch to detect NULL pointer dereference vulnerability in Ollama, with a CVSS 3.1 base score of 7.5 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected Ollama versions: v0.11.5-rc0 through 0.13.5. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 0.77% chance of exploitation within 30 days, higher than 56% of scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- Check which version of Ollama you run against the affected versions below, and install the vendor's latest release.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Ollama | Ollama | v0.11.5-rc0 through 0.13.5 | Not stated |
| Red Hat | Red Hat Ansible Automation Platform 2 | Not specified in the record | Not stated |
| Red Hat | Red Hat OpenShift AI (RHOAI) | Not specified in the record | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- NoneNo data is disclosed.
- Integrity
- NoneNothing can be modified.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 4.0 | 8.7 | High | CNA (vulncheck.com) |
| CVSS 3.1 | 7.5 | High | NVD |
| CVSS 3.1 | 7.5 | High | CNA |
Official description
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 mtmd_helper_bitmap_init_from_buf 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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Use of NullPointerException Catch to Detect NULL Pointer Dereference
Catching NullPointerException should not be used as an alternative to programmatic checks to prevent dereferencing a null pointer.
How developers prevent this class of flaw
- Do not extensively rely on catching exceptions (especially for validating user input) to handle errors. Handling exceptions can decrease the performance of an application.
More Use of NullPointerException Catch to Detect NULL Pointer Dereference vulnerabilities (CWE-395)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: poc, automatable: yes, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- huntr.com/bounties/172df98b-07cd-41ea-a628-366f8cd525c0Exploit, Third Party Advisory
Third-party and government advisories
Other references
Other vulnerabilities in Ollama
- 7.3 High severity
- 9.4 Critical severity
- 7.8 High severity
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
Recent Use of NullPointerException Catch to Detect NULL Pointer Dereference vulnerabilities
- 9.8 Critical severity
- 9.8 Critical severity
Spotted an error? Tell us.