CVEfocus › CVE database › CVE-2023-47641

CVE-2023-47641Inconsistent interpretation of `Content-Length` vs. `Transfer-Encoding` in aiohttp

CVSS 3.4 LowEPSS 1.0% (higher than 62% of CVEs)Published 2023-11-14Updated 2025-11-03Assigner: GitHub_M

aiohttp is an asynchronous HTTP client/server framework for asyncio and Python. Affected versions of aiohttp have a security vulnerability regarding the inconsistent interpretation of the http protocol. HTTP/1.1 is a persistent protocol, if both Content-Length(CL) and Transfer-Encoding(TE) header values are present it can lead to incorrect interpretation of two entities that parse the HTTP and we can poison other sockets with this incorrect interpretation. A possible Proof-of-Concept (POC) would be a configuration with a reverse proxy(frontend) that accepts both CL and TE headers and aiohttp as backend. As aiohttp parses anything with chunked, we can pass a chunked123 as TE, the frontend entity will ignore this header and will parse Content-Length. The impact of this vulnerability is that it is possible to bypass any proxy rule, poisoning sockets to other users like passing Authentication Headers, also if it is present an Open Redirect an attacker could combine it to redirect random users to another website and log the request. This vulnerability has been addressed in release 3.8.0 of aiohttp. Users are advised to upgrade. There are no known workarounds for this vulnerability.

CWE-444

What to do

Fixed builds are available from Debian, PyPI: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

4Fixed
3Fix pending
1Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 25.10python-aiohttpNot affected
vulnerable_code_not_present
Ubuntu 20.04python-aiohttpFix pendingUBUNTU-CVE-2023-47641
Ubuntu 18.04python-aiohttpFix pendingUBUNTU-CVE-2023-47641
Ubuntu 16.04python-aiohttpFix pendingUBUNTU-CVE-2023-47641
Debian 14python-aiohttpFixed3.8.1-1DEBIAN-CVE-2023-47641
Debian 13python-aiohttpFixed3.8.1-1DEBIAN-CVE-2023-47641
Debian 12python-aiohttpFixed3.8.1-1DEBIAN-CVE-2023-47641
PyPI libraryaiohttpFixed3.8.0PYSEC-2023-247

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.