{"id":"CVE-2023-47641","published":"2023-11-14T20:44:08Z","modified":"2025-11-03T20:36:08Z","title":"Inconsistent interpretation of `Content-Length` vs. `Transfer-Encoding` in aiohttp","vendor":"aio-libs","product":"aiohttp","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":3.4,"severity":"LOW","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00959,"percentile":0.62385,"provenance":"source"},"cwes":[{"id":"CWE-444","name":"Inconsistent Interpretation of HTTP Requests"}],"references":[{"url":"https://github.com/aio-libs/aiohttp/security/advisories/GHSA-xx9p-xxvh-7g8j","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/aio-libs/aiohttp/commit/f016f0680e4ace6742b03a70cb0382ce86abe371","tags":["x_refsource_MISC"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/02/msg00002.html","tags":[]}],"priority":{"score":14.9,"factors":[{"name":"EPSS percentile","points":12.48},{"name":"CVSS severity","points":2.38}]},"vendorSlug":"aio-libs","affectedVersions":[{"vendor":"aio-libs","product":"aiohttp","versions":["< 3.8.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-08-29T20:18:44.628858Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"aiohttp","vulnerableRanges":["<3.8.0"],"patched":["3.8.0"],"from":["GHSA-xx9p-xxvh-7g8j","PYSEC-2023-247"],"provenance":"source"}],"summary":{"text":"The flaw is an inconsistent interpretation of the Content-Length and Transfer-Encoding headers in aiohttp, an asyncio-based HTTP client and server framework for Python, in affected versions before 3.8.0. When both headers are present, aiohttp and a frontend reverse proxy can parse the same request differently, letting an attacker with network access and a configuration where a proxy sits in front of aiohttp poison the connection for other users, bypass proxy rules, and capture requests such as authentication headers, with exploitation requiring a victim to take some user action.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:44:57Z"},"euvd":{"id":"EUVD-2023-0005","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-aio-libs-aiohttp-cve-2023-47627","parents":[{"from":"CVE-2023-47627","to":"CVE-2023-47641","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["aiohttp/http_parser.py"],"commits":["https://github.com/aio-libs/aiohttp/commit/d5c12ba890557a575c313bb3017910d7616fce3d","https://github.com/aio-libs/aiohttp/commit/f016f0680e4ace6742b03a70cb0382ce86abe371"],"basis":"shared function","functions":["parse_headers"]}]}],"children":[{"from":"CVE-2023-47641","to":"CVE-2024-23829","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["aiohttp/http_parser.py"],"commits":["https://github.com/aio-libs/aiohttp/commit/f016f0680e4ace6742b03a70cb0382ce86abe371","https://github.com/aio-libs/aiohttp/commit/33ccdfb0a12690af5bb49bda2319ec0907fa7827"],"basis":"shared function","functions":["parse_headers"]}]},{"from":"CVE-2023-47641","to":"CVE-2025-53643","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["aiohttp/http_parser.py"],"commits":["https://github.com/aio-libs/aiohttp/commit/f016f0680e4ace6742b03a70cb0382ce86abe371","https://github.com/aio-libs/aiohttp/commit/e8d774f635dc6d1cd3174d0e38891da5de0e2b6a"],"basis":"shared function","functions":["parse_headers"]}]},{"from":"CVE-2023-47641","to":"CVE-2025-69224","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["aiohttp/http_parser.py"],"commits":["https://github.com/aio-libs/aiohttp/commit/f016f0680e4ace6742b03a70cb0382ce86abe371","https://github.com/aio-libs/aiohttp/commit/32677f2adfd907420c078dda6b79225c6f4ebce0"],"basis":"shared function","functions":["parse_headers"]}]}]}}