🔍 CVE-2026-85999

5.3
CVSS Score
MEDIUM
2026-09-17
2026-09-23 18:12
✅ 완료

🇰🇷 한글 설명

Soup Sieve 2.9 미만 버전의 selector_iter 함수에서 정규 표현식 엔진의 비효율적인 처리로 인해 발생하는 CPU 자원 고갈 취약점입니다. 공격자가 제어 가능한 긴 공백이나 주석이 포함된 CSS 선택자를 입력할 경우, 토큰화 과정에서 이차 함수적인 CPU 연산이 발생하여 서비스가 중단될 수 있습니다. 이 문제는 BeautifulSoup.select() 등을 통해 사용자 입력이 전달될 때 발생합니다.

💡 쉬운 설명

특수하게 조작된 긴 문장을 입력하면 컴퓨터가 이를 처리하느라 과도한 계산을 반복하게 만드는 공격입니다. 이로 인해 서버의 CPU 사용량이 급증하여 웹사이트 서비스가 느려지거나 멈출 수 있습니다.

🇺🇸 원문 (English)

Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4. Prior to 2.9, selector_iter in src/soupsieve/css_parser.py trims the raw selector with RE_WS_END, an end-anchored WSC whitespace-and-comment expression used with search(), so the regular expression engine retries a greedy scan at every starting offset. An attacker-controlled valid selector containing a long internal whitespace run, or a selector containing a long CSS comment run followed by another token, causes quadratic CPU work before tokenization. User-controlled selectors can reach the path through soupsieve.compile() and BeautifulSoup.select(), while applications using only hard-coded selectors are unaffected. This root cause is separate from the IDENTIFIER and VALUE backtracking vulnerability because the cost occurs in RE_WS_END.search during trimming rather than token matching. The resulting CPU consumption can hold the Python GIL, exhaust workers, and stall a service without causing memory corruption or code execution. The issue is fixed in version 2.9.

📍 영향받는 시스템

Soup Sieve 2.9 미만 버전 (BeautifulSoup 4와 함께 사용 시)

⚔️ 공격 벡터

사용자로부터 입력받은 CSS 선택자를 soupsieve.compile() 또는 BeautifulSoup.select()에 전달하여 CPU 부하 유도

🛡️ 대응 방법

Soup Sieve를 2.9 이상의 최신 버전으로 업데이트하십시오.

🔧 검증 코드

출력된 버전 번호가 2.9 미만(예: 2.8.x)이면 취약한 상태입니다.

Shell / Script
pip show soupsieve 2>/dev/null | grep Version

📊 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