☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Ollama logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 7.5 🐛 CWE-369
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-8063

CVE-2024-8063 Denial of Service in Ollama
📅 PUBLISHED: 2025-03-20 10:10 UTC 🔄 UPDATED: 2026-08-28 11:35 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.62%
👁️
0.62% probability
15.5× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
7.5
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-8063 is a high-severity (CVSS 7.5) denial-of-service vulnerability affecting Ollama v0.3.3. The flaw resides in the GGUF model import functionality, where a crafted block_count value in the Modelfile triggers a divide-by-zero error. This causes the Ollama server process to crash, leading to service unavailability. No public exploit code or patch is currently available. The vulnerability is classified under CWE-369 (Divide By Zero) and aligns with MITRE ATT&CK tactic T1499 (Endpoint Denial of Service). The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the risk remains for exposed Ollama instances.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – The vulnerability can be triggered remotely.
  • Attack Complexity (AC): Low (L) – No special conditions required beyond sending a crafted model.
  • Privileges Required (PR): None (N) – No authentication needed.
  • User Interaction (UI): None (N) – No user action required.
  • Scope (S): Unchanged (U) – The crash does not affect other components.
  • Confidentiality (C): None (N) – No data exposure.
  • Integrity (I): None (N) – No data modification.
  • Availability (A): High (H) – Service crash leads to denial of service.

Threat Level: High. While no active exploitation is reported, the vulnerability is trivial to trigger and can cause immediate service disruption.

Deep Dive & Mechanics

The vulnerability exists in the GGUF model import routine within Ollama. When a user imports a model via a Modelfile, the server parses the model metadata, including block_count. If an attacker crafts a Modelfile where block_count is set to zero, the server performs a division operation using this value as a divisor. In C/C++ (the likely implementation language), division by zero results in undefined behavior, typically causing a SIGFPE signal and process termination.

The attack vector is simple: an attacker with network access to the Ollama API can send a POST request to the model import endpoint with a malicious Modelfile. The server crashes immediately upon processing, denying service to legitimate users.

Vulnerable vs. Patched Code

Vulnerable Code (v0.3.3):

// Hypothetical vulnerable code snippet
int block_count = get_block_count_from_modelfile();
int result = some_value / block_count; // Division by zero if block_count == 0

Patched Code (Hypothetical):

// Patched code with zero check
int block_count = get_block_count_from_modelfile();
if (block_count == 0) {
    return error("Invalid block_count: must be non-zero");
}
int result = some_value / block_count;

No official patch has been released. The fix should include input validation to reject zero values for block_count.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • Network access to an Ollama server (default port 11434).
  • Ability to send HTTP POST requests.

Exploitation Steps:

  1. Craft a malicious Modelfile with block_count set to 0.
  2. Send a POST request to /api/create with the Modelfile content.
  3. The server crashes, causing a denial of service.

Example Request:

curl -X POST http://target:11434/api/create \
  -H "Content-Type: application/json" \
  -d '{"name": "malicious-model", "modelfile": "FROM llama2\nPARAMETER block_count 0"}'

Expected Outcome: The Ollama server process terminates, and subsequent requests fail.

Blue Team

Detection:

  • Monitor for rapid server restarts or crashes.
  • Alert on HTTP 500 errors or connection resets from the Ollama API.
  • Log analysis for requests containing block_count 0 in the Modelfile.

Mitigation:

  • Restrict network access to the Ollama API (firewall rules).
  • Implement input validation at the reverse proxy level (e.g., Nginx) to block requests with block_count 0.
  • Deploy a Web Application Firewall (WAF) with custom rules to detect malicious Modelfiles.

Indicators of Compromise (IOCs)

  • Network: HTTP POST requests to /api/create with block_count 0 in the body.
  • System: Ollama server process crash logs containing SIGFPE or division-by-zero errors.
  • File: Modelfiles with block_count 0 in transit or on disk.
  • Behavior: Repeated server restarts or unavailability of the Ollama service.

Detection Engineering

YARA Rule

rule CVE_2024_8063_Ollama_Divide_By_Zero {
    meta:
        description = "Detects malicious Modelfiles targeting CVE-2024-8063"
        author = "Valters IT"
        date = "2025-04-10"
        cve = "CVE-2024-8063"
    strings:
        $block_count = "block_count" nocase
        $zero = "0" ascii
    condition:
        $block_count and $zero and filesize < 10KB
}

Sigma Rule

title: Ollama Divide by Zero DoS Attempt
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects HTTP requests to Ollama API with block_count set to 0
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: nginx
detection:
    selection:
        cs-method: 'POST'
        cs-uri-stem: '/api/create'
        cs-body|contains: 'block_count 0'
    condition: selection
falsepositives:
    - Legitimate testing with zero block_count (unlikely)
level: high

Suricata Rule

alert http any any -> any any (
    msg:"CVE-2024-8063 Ollama Divide by Zero DoS Attempt";
    flow:to_server;
    content:"POST"; http_method;
    content:"/api/create"; http_uri;
    content:"block_count 0"; http_client_body;
    classtype:attempted-dos;
    sid:1000001;
    rev:1;
)

Remediation & Mitigation

Immediate Actions:

  1. Isolate Ollama servers from untrusted networks.
  2. Implement input validation at the application or proxy layer to reject block_count values of zero.
  3. Monitor for crash events and anomalous API requests.

Long-Term Fix:

  • Await an official patch from Ollama. Until then, consider using a fork or custom build with the zero-check fix.
  • Upgrade to a patched version once released.

Workaround:

  • Use a reverse proxy (e.g., Nginx) to filter requests containing block_count 0:
location /api/create {
    if ($request_body ~* "block_count 0") {
        return 403;
    }
    proxy_pass http://ollama_backend;
}

Valters IT
DevSecOps & Cyber Threat Intelligence

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-8063/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.