{
  "schema": "aidefend-secureflow-metadata-v1",
  "flow_id": "aidefend-research-sf0054-bleeding-llama-ollama-memory-leak",
  "title": "Bleeding Llama: Ollama GGUF Heap Read and Model Push",
  "subtitle": "CVE-2026-7482 requires a reachable Ollama management API; the default upstream bind is localhost.",
  "summary": "Cyera demonstrated that a crafted GGUF tensor size could make Ollama before 0.17.1 read beyond its heap buffer during F16-to-F32 conversion in /api/create; the flaw is tracked as CVE-2026-7482, a public vulnerability identifier. The leaked bytes were written into a model artifact and could be sent to an attacker registry through /api/push. Network exploitation requires an exposed API: the upstream Ollama binary defaults to 127.0.0.1, the official container image sets OLLAMA_HOST to 0.0.0.0, and operators can change the bind address themselves.",
  "reviewed": true,
  "import_status": "curated-research",
  "ai_layers": [
    "autonomous-agents"
  ],
  "risk_impact": [
    "data-exfiltration"
  ],
  "affected_components": [
    "/api/blobs upload",
    "/api/create GGUF quantization",
    "/api/push model export",
    "Ollama process heap"
  ],
  "source_research": {
    "provider": "Cyera Research",
    "primary_url": "https://www.cyera.com/research/bleeding-llama-critical-unauthenticated-memory-leak-in-ollama",
    "published": "2026-05-05",
    "note": "AIDEFEND-curated public SecureFlow based on public reporting and supporting references. This is not a MITRE ATLAS case-study conversion."
  },
  "attack_steps": [
    {
      "id": "step-1",
      "title": "Reach an Exposed Ollama Management API",
      "tactic": "AML.TA0004",
      "technique": "AML.T0049",
      "summary": "The attacker must reach /api/blobs, /api/create and /api/push through non-default network exposure or an allowed local route; upstream defaults to loopback.",
      "zhTitle": "連到對外開放的 Ollama 管理 API",
      "zhSummary": "攻擊者須經非預設的網路暴露或可用的本機路徑連到 /api/blobs、/api/create 與 /api/push；上游預設只監聽 loopback。",
      "layout": {
        "x": -960,
        "y": 0
      }
    },
    {
      "id": "step-2",
      "title": "Upload a Crafted GGUF Blob",
      "tactic": "AML.TA0004",
      "technique": "AML.T0049",
      "summary": "A GGUF tensor declares more elements than its actual data buffer contains and is uploaded to /api/blobs.",
      "zhTitle": "上傳特製 GGUF 檔案",
      "zhSummary": "GGUF 張量宣告的元素數超過實際資料緩衝區大小，並透過 /api/blobs 上傳。",
      "layout": {
        "x": -480,
        "y": 0
      }
    },
    {
      "id": "step-3",
      "title": "Trigger F16-to-F32 Conversion in /api/create",
      "tactic": "AML.TA0004",
      "technique": "AML.T0049",
      "summary": "The attacker creates a model from the blob and requests F32 output; the vulnerable conversion reads past the heap allocation and writes neighboring bytes into the new model.",
      "zhTitle": "在 /api/create 觸發 F16 轉 F32",
      "zhSummary": "攻擊者以檔案建立模型並要求 F32；有漏洞的轉換越界讀取 heap，將鄰近位元組寫進新模型。",
      "layout": {
        "x": 0,
        "y": 0
      }
    },
    {
      "id": "step-4",
      "title": "Push the Leaking Model to an Attacker Registry",
      "tactic": "AML.TA0010",
      "technique": "AML.T0025",
      "summary": "The model is named for an attacker-controlled registry and /api/push uploads the resulting artifact, which may contain prompts or other process memory from the test.",
      "zhTitle": "把含外洩內容的模型推送至攻擊者 registry",
      "zhSummary": "模型名稱指向攻擊者控制的 registry，/api/push 將可能含提示內容及其他測試環境程序記憶體的成品送出。",
      "layout": {
        "x": 480,
        "y": 0
      }
    }
  ],
  "threat_refs": [
    {
      "id": "AML.T0049",
      "name": "Exploit Public-Facing Application"
    },
    {
      "id": "AML.T0025",
      "name": "Exfiltration via Cyber Means"
    }
  ]
}
