CVE-2023-47627: AIOHTTP HTTP Parser Vulnerability

aiohttp Updated 02 Oct 2025

Summary

14/11/2023
Yes i
Moderate
5.3

CVE-2023-47627: AIOHTTP has problems in HTTP parser (the python one, not llhttp). Affects aiohttp versions < 3.8.6. Fixed in 3.8.6. How to fix ↓

Also tracked for

The same CVE-2023-47627 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

AIOHTTP is a Python library that provides an asynchronous HTTP client and server implementation. It is widely used for building web applications and APIs. The library allows developers to handle HTTP requests and responses efficiently. However, a vulnerability has been discovered in the HTTP parser of AIOHTTP, which can lead to request smuggling attacks.

Vulnerability Detail

The vulnerability in AIOHTTP's HTTP parser has several issues related to header parsing. These issues can be exploited to perform request smuggling attacks. The specific problems include:

  1. Bad parsing of Content-Length values: AIOHTTP does not enforce the correct format for Content-Length values, leading to misinterpretation.

  2. Improper handling of NUL, CR, and LF characters in header values: AIOHTTP does not replace these forbidden characters with spaces, allowing them to be processed.

  3. Improper stripping of whitespace before colon in HTTP headers: AIOHTTP does not enforce the rule that no whitespace should be present before the colon in header fields.

These vulnerabilities can be used by attackers to manipulate HTTP requests and potentially bypass security measures.

How To Fix

Latest published version: 3.14.5 as of 22 Oct 2026

pip install --upgrade "aiohttp==3.14.5"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.8.6

This is the first release that contains the fix.

pip install --upgrade "aiohttp==3.8.6"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If updating AIOHTTP is not immediately possible, a workaround is to manually enforce the correct format for Content-Length values, replace forbidden characters with spaces in header values, and reject messages with whitespace before the colon in header fields. Here is an example code snippet for enforcing the Content-Length format:

import aiohttp

def enforce_content_length_format(request):
    content_length = request.headers.get('Content-Length')
    if content_length and not content_length.isdigit():
        raise ValueError('Invalid Content-Length format')

# Usage:
request = aiohttp.Request()
enforce_content_length_format(request)

Please note that this is a temporary workaround and updating to the latest version of AIOHTTP is still recommended.

Conclusion

The AIOHTTP HTTP parser vulnerability exposes applications using AIOHTTP to potential request smuggling attacks. It is crucial to update AIOHTTP to version 3.8.6 or later to mitigate these vulnerabilities. If immediate updating is not possible, developers should apply the provided workaround and ensure they are enforcing the correct format for Content-Length values, replacing forbidden characters with spaces, and rejecting messages with whitespace before the colon in header fields. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for aiohttp →

Share this vulnerability

FAQ

AIOHTTP is a Python library that provides an asynchronous HTTP client and server implementation. It is commonly used for building web applications and APIs.

Request smuggling is a technique used by attackers to manipulate the interpretation of HTTP requests by intermediate systems, such as proxies or load balancers. It can lead to security vulnerabilities and bypass of security measures.

The AIOHTTP HTTP parser vulnerability can be exploited by sending specially crafted HTTP requests that exploit the header parsing issues. This can allow an attacker to manipulate the interpretation of the requests and potentially bypass security measures.

Yes, a fix is available for the AIOHTTP vulnerability. It is recommended to update AIOHTTP to version 3.8.6 or later, which includes fixes for the HTTP parser issues.

If updating AIOHTTP is not immediately possible, a workaround is to manually enforce the correct format for Content-Length values, replace forbidden characters with spaces in header values, and reject messages with whitespace before the colon in header fields. However, updating to the latest version of AIOHTTP is still recommended.

Related vulnerabilities

Recent vulnerabilities recorded for aiohttp.

How To Fix

Latest published version: 3.14.5 as of 22 Oct 2026

pip install --upgrade "aiohttp==3.14.5"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.8.6

This is the first release that contains the fix.

pip install --upgrade "aiohttp==3.8.6"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback