Skip to content
Info disclosure Disclosed report Intermediate CVE-2025-51471

Ollama vulnerable to Cross-Domain Token Exposure

Ollama 0.6.7's server.auth.getAuthorizationToken function mishandles the realm value in a WWW-Authenticate header returned by the /api/pull endpoint. A remote attacker could use a malicious realm to steal authentication tokens and bypass access controls.

ollama/ollama

Originally disclosed on huntr

Cross-Domain Token Exposure in server.auth.getAuthorizationToken in Ollama 0.6.7 allows remote attackers to steal authentication tokens and bypass access controls via a malicious realm value in a WWW-Authenticate header returned by the /api/pull endpoint.

From the GitHub Advisory Database (GHSA-x9hg-5q6g-q3jr, CC BY 4.0).

The original report as published on the GitHub Advisory Database. Images and videos are our own copies; raw HTML is shown as text. View it on GitHub Advisory Database.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the client-side authentication logic used the server-supplied realm value without validating it, allowing token leakage to an attacker-controlled destination.

Impact

A remote attacker could steal authentication tokens and bypass access controls, though the text does not specify which clients or configurations are affected.

What the attacker needed

Attacker controls a server that Ollama contacts; victim uses Ollama 0.6.7

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When a server asks a client to log in, it sends a challenge that includes a 'realm' name. Ollama's client code apparently trusted that name too much, so a malicious server could trick it into sending the user's token somewhere else. That token could then be used to access protected parts of Ollama.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.