CyberSecBulletin
CVE-2025-15514NVD status: Modified

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.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Check which version of Ollama you run against the affected versions below, and install the vendor's latest release.
  2. Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.

Affected products and versions

VendorProductAffected versionsFixed in
OllamaOllamav0.11.5-rc0 through 0.13.5Not stated
Red HatRed Hat Ansible Automation Platform 2Not specified in the recordNot stated
Red HatRed Hat OpenShift AI (RHOAI)Not specified in the recordNot 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 systemScoreSeverityScored by
CVSS 4.08.7HighCNA (vulncheck.com)
CVSS 3.17.5HighNVD
CVSS 3.17.5HighCNA

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

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: poc, automatable: yes, technical impact: partial).
  3. Record last changed materially (score, affected products, status or references).

References

Patches and release notes

Third-party and government advisories

Other vulnerabilities in Ollama

All Ollama vulnerabilities

Recent Use of NullPointerException Catch to Detect NULL Pointer Dereference vulnerabilities

Spotted an error? Tell us.