🔍 CVE-2025-54121

5.3
CVSS Score
MEDIUM
2025-07-21
2026-04-15 00:35
✅ 완료

🇰🇷 한글 설명

Starlette 0.47.1 이하 버전에서 대용량 파일이 포함된 멀티파트 폼 파싱 시 메인 스레드가 차단되어 새로운 연결을 수락할 수 없게 됩니다. UploadFile 코드가 메모리 여유 공간을 정확히 확인하지 않아 바이트 추가로 인한 롤오버를 감지하지 못하는 버그입니다.

💡 쉬운 설명

웹 서버가 큰 파일 업로드를 받을 때 다른 사용자의 요청을 처리하지 못하고 멈추게 됩니다. 파일을 메모리에서 디스크로 옮기는 과정에서 서버가 완전히 응답 불가능 상태가 됩니다.

🇺🇸 원문 (English)

Starlette is a lightweight ASGI (Asynchronous Server Gateway Interface) framework/toolkit, designed for building async web services in Python. In versions 0.47.1 and below, when parsing a multi-part form with large files (greater than the default max spool size) starlette will block the main thread to roll the file over to disk. This blocks the event thread which means the application can't accept new connections. The UploadFile code has a minor bug where instead of just checking for self._in_memory, the logic should also check if the additional bytes will cause a rollover. The vulnerability is fixed in version 0.47.2.

📍 영향받는 시스템

Starlette 0.47.1 이하 모든 버전

⚔️ 공격 벡터

기본 스풀 크기보다 큰 파일을 포함한 멀티파트 폼 요청을 반복적으로 전송하여 메인 스레드 차단 유발

🛡️ 대응 방법

Starlette을 0.47.2 이상으로 업그레이드

🔧 검증 코드

Patched가 출력되면 취약성이 해결된 상태, Vulnerable이 출력되면 패치 필요

Shell / Script
python -c "import starlette; print('Vulnerable' if tuple(map(int, starlette.__version__.split('.')[:2])) < (0, 47) or (starlette.__version__.startswith('0.47.') and int(starlette.__version__.split('.')[2]) < 2) else 'Patched')"

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

💻 영향받는 소프트웨어

Python