// For flags

CVE-2024-30251

Denial of service when trying to parse malformed POST requests in aiohttp

Severity Score

7.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Attend
*SSVC
Descriptions

aiohttp is an asynchronous HTTP client/server framework for asyncio and Python. In affected versions an attacker can send a specially crafted POST (multipart/form-data) request. When the aiohttp server processes it, the server will enter an infinite loop and be unable to process any further requests. An attacker can stop the application from serving requests after sending a single request. This issue has been addressed in version 3.9.4. Users are advised to upgrade. Users unable to upgrade may manually apply a patch to their systems. Please see the linked GHSA for instructions.

aiohttp es un framework cliente/servidor HTTP asíncrono para asyncio y Python. En las versiones afectadas, un atacante puede enviar una solicitud POST (multipart/form-data) especialmente manipulada. Cuando el servidor aiohttp lo procese, el servidor entrará en un bucle infinito y no podrá procesar más solicitudes. Un atacante puede impedir que la aplicación atienda solicitudes después de enviar una sola solicitud. Este problema se solucionó en la versión 3.9.4. Se recomienda a los usuarios que actualicen. Los usuarios que no puedan actualizar pueden aplicar manualmente un parche a sus sistemas. Consulte la GHSA vinculada para obtener instrucciones.

An infinite loop flaw was found in aiohttp when handling POST (multipart/form-data) requests. This flaw allows an attacker to send a specially crafted request, leading the server to enter an infinite loop and render it unable to process any further requests. This denial of service can be triggered by a single unauthenticated POST request.

AIOHTTP handles multipart strings through a process of segmenting them into chunks. The reading of each chunk is performed under the control of an asynchronous wait, ensuring that the operation completes before proceeding. A vulnerability was identified where a specially crafted request could trigger an infinite loop due to improper detection of the end-of-file (EOF) marker within the content.

The resolution involves the implementation of an enhanced checking mechanism. This mechanism correctly assigns the EOF marker to the chunk in question upon the successful completion of content reading, thereby preventing the infinite loop scenario.

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
* Common Vulnerability Scoring System
SSVC
  • Decision:Attend
Exploitation
None
Automatable
Yes
Tech. Impact
Partial
* Organization's Worst-case Scenario
Timeline
  • 2024-03-26 CVE Reserved
  • 2024-05-02 CVE Published
  • 2024-05-03 EPSS Updated
  • 2024-08-02 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Aio-libs
Search vendor "Aio-libs"
Aiohttp
Search vendor "Aio-libs" for product "Aiohttp"
< 3.9.4
Search vendor "Aio-libs" for product "Aiohttp" and version " < 3.9.4"
en
Affected