Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2024-12886: CWE-409 Improper Handling of Highly Compressed Data (Data Amplification) in ollama ollama/ollama

0
High
VulnerabilityCVE-2024-12886cvecve-2024-12886cwe-409
Published: Thu Mar 20 2025 (03/20/2025, 10:10:28 UTC)
Source: CVE Database V5
Vendor/Project: ollama
Product: ollama/ollama

Description

An Out-Of-Memory (OOM) vulnerability exists in the `ollama` server version 0.3.14. This vulnerability can be triggered when a malicious API server responds with a gzip bomb HTTP response, leading to the `ollama` server crashing. The vulnerability is present in the `makeRequestWithRetry` and `getAuthorizationToken` functions, which use `io.ReadAll` to read the response body. This can result in excessive memory usage and a Denial of Service (DoS) condition.

AI-Powered Analysis

AILast updated: 10/15/2025, 13:24:09 UTC

Technical Analysis

CVE-2024-12886 is an Out-Of-Memory (OOM) vulnerability classified under CWE-409 (Improper Handling of Highly Compressed Data) that affects the ollama server, specifically version 0.3.14. The vulnerability is triggered when the ollama server receives a malicious HTTP response containing a gzip bomb—a highly compressed payload that expands dramatically when decompressed. The affected functions, makeRequestWithRetry and getAuthorizationToken, use the Go language's io.ReadAll method to read the entire response body without imposing any size restrictions or decompression limits. This leads to excessive memory allocation as the server attempts to decompress and load the entire payload into memory, ultimately exhausting available resources and causing the server to crash. The vulnerability can be exploited remotely without any authentication or user interaction, making it accessible to unauthenticated attackers. The impact is a Denial of Service (DoS) condition, disrupting the availability of the ollama server and any dependent services. While no public exploits are currently known, the high CVSS score of 7.5 reflects the ease of exploitation and significant impact on availability. The vulnerability highlights the risks of insufficient input validation and resource management when handling compressed data in networked applications.

Potential Impact

For European organizations using the ollama server, this vulnerability can lead to service outages due to server crashes triggered by malicious gzip bomb responses. The DoS condition can disrupt AI-driven services or applications relying on ollama, potentially affecting business operations, customer interactions, and internal workflows. Organizations in sectors with high reliance on AI or automated API interactions—such as finance, healthcare, and technology—may face operational risks and reputational damage if availability is compromised. Additionally, the remote and unauthenticated nature of the exploit increases the threat surface, allowing attackers to disrupt services without needing insider access. The lack of known exploits in the wild reduces immediate risk but does not eliminate the potential for future attacks. European entities must consider the impact on service continuity and prepare for incident response scenarios involving resource exhaustion attacks.

Mitigation Recommendations

To mitigate CVE-2024-12886, organizations should implement strict limits on the size of HTTP response bodies accepted by the ollama server, especially when handling compressed content. Specifically, developers should avoid using io.ReadAll without size constraints and instead use streaming or buffered reading with maximum size thresholds. Validating the Content-Encoding header and rejecting suspicious or excessively compressed payloads can prevent gzip bomb exploitation. Monitoring memory usage and setting resource quotas for the ollama process can help detect and contain abnormal behavior. Applying patches or updates from the ollama vendor as soon as they become available is critical. Network-level protections, such as Web Application Firewalls (WAFs) or Intrusion Prevention Systems (IPS), can be configured to detect and block gzip bomb patterns. Finally, conducting regular security assessments and fuzz testing on API endpoints can identify similar vulnerabilities proactively.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
@huntr_ai
Date Reserved
2024-12-20T23:25:22.273Z
Cvss Version
3.0
State
PUBLISHED

Threat ID: 68ef9b25178f764e1f470b13

Added to database: 10/15/2025, 1:01:25 PM

Last enriched: 10/15/2025, 1:24:09 PM

Last updated: 10/16/2025, 2:50:59 PM

Views: 1

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats