VAITP Dataset

← Back to the dataset

CVE-2026-128130

Memory leak and request replay in aiohttp when queue full, fixed in 3.14.4.

  • CVSS 8.3
  • CWE-770
  • Resource Management
  • Remote

AIOHTTP is an asynchronous HTTP client/server framework for asyncio and Python. Prior to 3.14.4, when the pipelined request queue is full, the pure-Python parser stores the unparsed remainder internally and also returns the same data to its caller. After a handler declines an upgrade request, the caller feeds the remainder back to the parser, causing the buffer to grow with each handled request and dispatching already-handled requests to the application again. The issue affects deployments using AIOHTTP_NO_EXTENSIONS or otherwise running without the standard C-extension wheel, and can cause excessive memory use and repeated request processing. This issue is fixed in version 3.14.4.

CVSS base score
8.3
Published
2026-11-13
OWASP
A06 Vulnerable and Outdated Components
Orthogonal defect classification
Assignment
Code defect classification
Missing Check
Category
Resource Management
Subcategory
Memory Leaks
Accessibility scope
Remote
Impact
Denial of Service (DoS)
Affected component
AIOHTTP
Fixed by upgrading
Yes

Solution

Upgrade aiohttp to version 3.14.4 or later.

Vulnerable code sample

import os
from aiohttp.http_parser import HttpRequestParser

# Simulate environment without C extensions
os.environ.setdefault('AIOHTTP_NO_EXTENSIONS', '1')

def handle_requests(stream):
    """
    Process a stream of raw HTTP request bytes using the pure‑Python parser.
    """
    parser = HttpRequestParser()
    buffer = b""
    for chunk in stream:
        # VULNERABLE: feeding unparsed remainder back into parser causes unbounded growth
        parser.feed_data(buffer + chunk)
        if parser.message_complete:
            # Process the request (placeholder)
            _ = parser.headers  # pretend we handle it
            # After handling, the parser may leave unparsed data (e.g., after a declined upgrade)
            buffer = parser.unparsed_data or b""
            # Incorrectly feed the remainder back on the next iteration
            continue
        else:
            buffer = parser.unparsed_data or b""
    # Ensure any leftover data is ignored
    return parser

Patched code sample

import os
from aiohttp.http_parser import HttpRequestParser

# Simulate environment without C extensions
os.environ.setdefault('AIOHTTP_NO_EXTENSIONS', '1')

def handle_requests(stream):
    """
    Process a stream of raw HTTP request bytes using the pure‑Python parser.
    """
    parser = HttpRequestParser()
    buffer = b""
    for chunk in stream:
        # FIX: do not re‑feed unparsed remainder, preventing buffer growth
        parser.feed_data(buffer + chunk)
        if parser.message_complete:
            # Process the request (placeholder)
            _ = parser.headers  # pretend we handle it
            # Discard any leftover data after handling
            buffer = b""
            continue
        else:
            buffer = parser.unparsed_data or b""
    return parser

Published fix

Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.

Cite this entry

@misc{vaitp:cve2026128130,
  title        = {{Memory leak and request replay in aiohttp when queue full, fixed in 3.14.4.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-128130},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-128130/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.