Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2024-10821

CVE-2024-10821: Invoke-AI Server DoS Vulnerability

CVE-2024-10821 is a denial of service flaw in Invoke-AI server v5.0.1 that allows attackers to cause excessive resource consumption through multipart boundary processing. This article covers technical details, impact, and mitigation.

Published:

CVE-2024-10821 Overview

CVE-2024-10821 is a Denial of Service (DoS) vulnerability affecting the Invoke-AI server version v5.0.1. The flaw resides in the multipart request boundary processing logic of the /api/v1/images/upload endpoint. Unauthenticated attackers can send a crafted multipart request with excessive characters appended to the boundary, triggering an infinite loop [CWE-835] in the server's parsing routine. The result is complete resource exhaustion and service unavailability for all users. The vulnerability requires no authentication and can be exploited remotely over the network.

Critical Impact

Unauthenticated remote attackers can render the Invoke-AI server completely unavailable by sending a single malformed multipart upload request, exhausting CPU resources through an infinite loop.

Affected Products

  • Invoke-AI server version v5.0.1
  • Endpoint: /api/v1/images/upload
  • Deployments exposing the Invoke-AI HTTP API to untrusted networks

Discovery Timeline

  • 2025-03-20 - CVE-2024-10821 published to the National Vulnerability Database (NVD)
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-10821

Vulnerability Analysis

The vulnerability stems from improper handling of multipart form-data boundary parsing in the Invoke-AI server. HTTP multipart requests use a boundary string, declared in the Content-Type header, to delimit each part of the payload. The Invoke-AI parser does not correctly validate or bound the number of trailing characters permitted after the declared boundary.

When an attacker appends an excessive number of characters to the boundary, the parser enters an infinite loop condition classified under [CWE-835] (Loop with Unreachable Exit Condition). The parsing thread consumes CPU cycles indefinitely and never returns control to the request handler. Because the Invoke-AI server processes uploads on shared worker threads, a small number of malicious requests is sufficient to consume all available workers and deny service to legitimate users.

The EPSS score is 0.588%, indicating a low but non-trivial probability of exploitation activity in the near term.

Root Cause

The root cause is missing input validation on the multipart boundary suffix. The parser lacks a termination condition when scanning malformed boundary sequences. There is no length ceiling on trailing characters and no timeout on the parsing operation.

Attack Vector

The attack requires only network access to the /api/v1/images/upload endpoint. No credentials, user interaction, or elevated privileges are required. An attacker sends an HTTP POST request with a Content-Type: multipart/form-data header whose boundary parameter is followed by an excessive number of characters. The server accepts the request, invokes the vulnerable boundary parser, and enters the infinite loop. Repeating this request against multiple worker threads produces total service outage.

No verified proof-of-concept code is publicly available. Refer to the Huntr
bounty listing for additional technical context on the boundary parsing flaw.

Detection Methods for CVE-2024-10821

Indicators of Compromise

  • HTTP POST requests to /api/v1/images/upload containing abnormally long Content-Type boundary values.
  • Invoke-AI worker threads pinned at 100% CPU utilization with no corresponding upload completion events.
  • Sudden drop in successful API response rates from the Invoke-AI server, followed by request timeouts.

Detection Strategies

  • Deploy web application firewall (WAF) rules that inspect multipart Content-Type headers and reject requests where the boundary parameter exceeds a reasonable length (for example, 70 characters per RFC 2046).
  • Correlate high per-process CPU usage on the Invoke-AI host with active connections to the /api/v1/images/upload endpoint.
  • Alert on repeated requests to the upload endpoint that do not produce a 2xx or 4xx response within the expected processing window.

Monitoring Recommendations

  • Enable verbose HTTP access logging on the Invoke-AI reverse proxy to capture full Content-Type header values.
  • Monitor thread pool saturation metrics and request queue depth on the Invoke-AI application server.
  • Track outbound response latency for the /api/v1/images/upload endpoint and alert on sustained increases.

How to Mitigate CVE-2024-10821

Immediate Actions Required

  • Restrict network access to the Invoke-AI server so the /api/v1/images/upload endpoint is not reachable from untrusted networks.
  • Place the Invoke-AI service behind a reverse proxy that enforces strict multipart header validation and request timeouts.
  • Apply rate limiting on the upload endpoint to reduce the impact of resource exhaustion attempts.

Patch Information

No vendor patch reference is included in the NVD data at the time of publication. Consult the Huntr Bounty Listing for remediation status and monitor the Invoke-AI project for updates beyond version v5.0.1.

Workarounds

  • Configure the upstream reverse proxy (for example, nginx or HAProxy) to enforce a maximum Content-Type header length and drop malformed multipart boundaries.
  • Set aggressive request read timeouts and worker CPU time limits so that a stuck parsing thread is terminated automatically.
  • Require authentication in front of the Invoke-AI API using a proxy-level auth layer until an official fix is available.
bash
# Example nginx configuration to reject oversized multipart boundaries
# and enforce request timeouts in front of Invoke-AI
http {
    client_header_timeout 10s;
    client_body_timeout   10s;
    send_timeout          10s;
    large_client_header_buffers 4 8k;

    map $http_content_type $bad_boundary {
        default                        0;
        "~*boundary=[^;]{200,}"        1;
    }

    server {
        listen 443 ssl;
        location /api/v1/images/upload {
            if ($bad_boundary) { return 400; }
            limit_req zone=upload burst=5 nodelay;
            proxy_pass http://invokeai_backend;
        }
    }
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.