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

CVE-2024-23829

CVE-2024-23829 Supply Chain Attack in Aiohttp
📅 PUBLISHED: 2024-01-29 22:41 UTC 🔄 UPDATED: 2026-10-02 19:33 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: CONFIRMED — 3+ independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 1.03%
👁️
1.03% probability
25.7× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
Country: Global License: Open Source
Patch available — upgrade to latest release
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
6.5
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-23829 is a high-severity vulnerability in the aiohttp library, an asynchronous HTTP client/server framework for Python. This flaw is a result of an incomplete fix for CVE-2023-47627 and involves inconsistent handling of malformed HTTP requests. Specifically, the Python HTTP parser in aiohttp retains minor differences in allowable character sets compared to internet standards, which can lead to request smuggling when deployed behind a proxy. Additionally, validation can trigger unhandled exceptions, causing excessive resource consumption on the application server and its logging facilities. The CVSS score is 6.5 (Medium), but the potential for request smuggling and resource exhaustion makes it a critical concern for any application using aiohttp.

⚡ 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

Supply Chain & Package Security

This vulnerability affects the aiohttp PyPI package. Organizations using aiohttp in their Python applications must ensure they are using version 3.9.2 or later. The supply chain risk is significant because aiohttp is a widely used library for building asynchronous web services. An attacker could exploit this vulnerability to perform request smuggling attacks, potentially bypassing security controls or poisoning web caches. The unhandled exception aspect could also lead to denial of service (DoS) by exhausting server resources.

CVSS Breakdown & Threat Level

  • CVSS Score: 6.5 (Medium)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: None
  • User Interaction: None
  • Scope: Unchanged
  • Confidentiality Impact: None
  • Integrity Impact: Low
  • Availability Impact: Low

The threat level is elevated due to the low attack complexity and the potential for request smuggling, which can have cascading effects on downstream systems.

Deep Dive & Mechanics

The vulnerability stems from the HTTP parser in aiohttp not strictly adhering to RFC standards for allowable character sets. This leniency allows an attacker to craft HTTP requests that are interpreted differently by aiohttp and an upstream proxy (e.g., Nginx, HAProxy). This discrepancy can be exploited for request smuggling.

Specifically, the parser may accept certain characters or sequences that should be rejected, leading to a situation where the proxy sees one request boundary, but aiohttp sees another. This allows an attacker to "smuggle" a malicious request within a legitimate one, potentially bypassing access controls, poisoning caches, or performing other attacks.

Additionally, the validation logic can throw unhandled exceptions when processing malformed input. Instead of gracefully handling the error and continuing, the exception can cause the server to crash or consume excessive resources (CPU, memory, or disk I/O for logging). This can be used for a denial of service attack.

The incomplete fix for CVE-2023-47627 means that previous patches did not fully address the character set and exception handling issues.

Vulnerable vs. Patched Code

The core difference lies in the HTTP request parsing logic. In vulnerable versions (before 3.9.2), the parser is more permissive with character validation and does not consistently handle exceptions.

Vulnerable Code (Conceptual):

# Simplified example of vulnerable parsing
def parse_request(data):
    # Lenient character validation
    if b'\x00' in data:  # Example of a character that might be allowed
        # Process request
        pass
    # Inconsistent exception handling
    try:
        method, path, version = data.split(b' ', 2)
    except ValueError:
        # This might not be caught properly, leading to unhandled exception
        raise

Patched Code (Conceptual):

# Simplified example of patched parsing
def parse_request(data):
    # Strict character validation per RFC
    if b'\x00' in data:
        raise BadRequest("Null byte in request")
    # Consistent exception handling
    try:
        method, path, version = data.split(b' ', 2)
    except ValueError:
        # Properly handle the error
        raise BadRequest("Malformed request line")

The actual patch in version 3.9.2 tightens the character set validation and ensures that all parsing errors are caught and handled gracefully, preventing both request smuggling and resource exhaustion.

Exploitation & Lab Setup

Red Team

Objective: Perform request smuggling to bypass security controls or cause a denial of service.

Lab Setup:

  1. Deploy a vulnerable aiohttp server (version < 3.9.2) behind a proxy (e.g., Nginx).
  2. Use a tool like netcat or curl to send crafted HTTP requests.

Exploitation Steps:

  1. Request Smuggling Payload:

    POST / HTTP/1.1
    Host: vulnerable-server.com
    Content-Length: 13
    Transfer-Encoding: chunked
    
    0
    
    GET /admin HTTP/1.1
    Host: vulnerable-server.com
    

    Note: This is a classic CL.TE smuggling attack. The proxy sees the Content-Length and forwards the entire body, but aiohttp sees the Transfer-Encoding: chunked and processes the smuggled request.

  2. Denial of Service Payload:

    GET / HTTP/1.1
    Host: vulnerable-server.com
    X-Invalid: \x00\x01\x02
    

    Sending a request with invalid characters that trigger an unhandled exception can cause the server to crash or consume excessive resources.

Blue Team

Objective: Detect and block request smuggling attempts and DoS attacks.

Detection Steps:

  1. Monitor for Anomalous HTTP Requests: Look for requests with conflicting Content-Length and Transfer-Encoding headers.
  2. Check for Invalid Characters: Inspect HTTP headers and bodies for null bytes or other non-printable characters.
  3. Monitor Server Logs: Watch for repeated ValueError or BadRequest exceptions in aiohttp logs.
  4. Rate Limiting: Implement rate limiting to mitigate DoS attacks.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • HTTP requests with both Content-Length and Transfer-Encoding headers.
    • HTTP requests containing null bytes (\x00) or other control characters in headers.
    • Repeated requests to the same endpoint with malformed data.
  • System IOCs:
    • High CPU or memory usage on the aiohttp server.
    • Rapidly growing log files with ValueError or BadRequest exceptions.
    • Unexplained crashes or restarts of the aiohttp process.

Detection Engineering

YARA Rule

rule CVE_2024_23829_Request_Smuggling {
    meta:
        description = "Detects HTTP requests attempting to exploit CVE-2024-23829 in aiohttp"
        author = "Valters IT"
        date = "2024-01-01"
        reference = "CVE-2024-23829"
    strings:
        $cl = "Content-Length:" nocase
        $te = "Transfer-Encoding:" nocase
        $null_byte = { 00 }
    condition:
        (all of ($cl, $te)) or ($null_byte)
}

Sigma Rule

title: CVE-2024-23829 - aiohttp Request Smuggling / DoS Attempt
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects HTTP requests with conflicting Content-Length and Transfer-Encoding headers or null bytes, indicating an attempt to exploit CVE-2024-23829.
author: Valters IT
date: 2024/01/01
logsource:
    category: webserver
    product: aiohttp
detection:
    selection:
        - http.request.headers|contains|all:
            - 'Content-Length'
            - 'Transfer-Encoding'
        - http.request.body|contains: '\x00'
    condition: selection
falsepositives:
    - Legitimate use of chunked transfer encoding with Content-Length (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-23829 - aiohttp Request Smuggling Attempt"; flow:to_server; content:"Content-Length"; http_header; content:"Transfer-Encoding"; http_header; sid:1000001; rev:1;)

alert http any any -> any any (msg:"CVE-2024-23829 - aiohttp Null Byte in Request"; flow:to_server; content:"|00|"; http_client_body; sid:1000002; rev:1;)

Remediation & Mitigation

  1. Immediate Action: Upgrade aiohttp to version 3.9.2 or later.
    pip install aiohttp>=3.9.2
    
  2. Virtual Patching: If immediate upgrade is not possible, deploy a Web Application Firewall (WAF) rule to block requests with conflicting Content-Length and Transfer-Encoding headers, or requests containing null bytes.
  3. Network Segmentation: Ensure that aiohttp servers are not directly exposed to the internet and are placed behind a properly configured reverse proxy.
  4. Monitoring: Implement logging and monitoring for the IOCs mentioned above.
  5. Code Review: Review any custom code that uses aiohttp's low-level HTTP parsing APIs to ensure proper error handling.

Valters IT

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-23829/ · 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.