// For flags

CVE-2023-47641

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

Severity Score

6.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

1
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Track
*SSVC
Descriptions

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.

aiohttp es un framework cliente/servidor HTTP asíncrono para asyncio y Python. Las versiones afectadas de aiohttp tienen una vulnerabilidad de seguridad relacionada con la interpretación inconsistente del protocolo http. HTTP/1.1 es un protocolo persistente, si los valores de encabezado Content-Length (CL) y Transfer-Encoding (TE) están presentes, puede llevar a una interpretación incorrecta de dos entidades que analizan HTTP y podemos envenenar otros sockets con esta interpretación incorrecta. Una posible Proof-of-Concept (POC) sería una configuración con un proxy inverso (frontend) que acepte encabezados CL y TE y aiohttp como backend. Como aiohttp analiza cualquier cosa con fragmentos, podemos pasar un fragmento123 como TE, la entidad de interfaz ignorará este encabezado y analizará la longitud del contenido. El impacto de esta vulnerabilidad es que es posible eludir cualquier regla de proxy, envenenando los sockets de otros usuarios, como pasar encabezados de autenticación. Además, si está presente un redireccionamiento abierto, un atacante podría combinarlo para redirigir a usuarios aleatorios a otro sitio web y registrar la solicitud. Esta vulnerabilidad se solucionó en la versión 3.8.0 de aiohttp. Se recomienda a los usuarios que actualicen. No se conocen workarounds para esta vulnerabilidad.

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
None
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:Track
Exploitation
None
Automatable
No
Tech. Impact
Partial
* Organization's Worst-case Scenario
Timeline
  • 2023-11-07 CVE Reserved
  • 2023-11-14 CVE Published
  • 2024-08-29 CVE Updated
  • 2024-08-29 First Exploit
  • 2024-11-20 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
CWE
  • CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Aiohttp
Search vendor "Aiohttp"
Aiohttp
Search vendor "Aiohttp" for product "Aiohttp"
< 3.8.0
Search vendor "Aiohttp" for product "Aiohttp" and version " < 3.8.0"
-
Affected