🇰🇷 한글 설명
python-multipart의 폼 데이터 파싱 과정에서 경계 부근의 줄 바꿈을 바이트 단위로 처리할 때 과도한 로깅이 발생합니다. 공격자가 첫 경계 앞이나 마지막 경계 뒤에 대량의 데이터를 포함한 악의적 요청을 보내면 CPU 부하 증가 및 처리 지연으로 인한 서비스 거부(DoS)가 발생할 수 있습니다.
💡 쉬운 설명
파일 업로드를 처리하는 python-multipart 라이브러리가 시작과 끝 부분의 빈 줄을 비효율적으로 처리합니다. 공격자가 이를 악용하여 많은 빈 줄을 포함한 요청을 보내면 서버가 느려지거나 멈출 수 있습니다.
🇺🇸 원문 (English)
python-multipart is a streaming multipart parser for Python. When parsing form data, python-multipart skips line breaks (CR \r or LF \n) in front of the first boundary and any tailing bytes after the last boundary. This happens one byte at a time and emits a log event each time, which may cause excessive logging for certain inputs. An attacker could abuse this by sending a malicious request with lots of data before the first or after the last boundary, causing high CPU load and stalling the processing thread for a significant amount of time. In case of ASGI application, this could stall the event loop and prevent other requests from being processed, resulting in a denial of service (DoS). This vulnerability is fixed in 0.0.18.
📍 영향받는 시스템
python-multipart < 0.0.18
⚔️ 공격 벡터
폼 데이터의 첫 경계 앞 또는 마지막 경계 뒤에 대량의 CR/LF 바이트를 포함한 악의적 HTTP POST 요청 전송
🛡️ 대응 방법
python-multipart를 0.0.18 이상으로 즉시 업데이트
🔧 검증 코드
출력된 버전이 0.0.18 이상이면 안전하며, 0.0.18 미만이면 즉시 업데이트 필요
pip show python-multipart | grep Version