🇰🇷 한글 설명
rrrene html_sanitize_ex 라이브러리의 CSS 스크러버 내 비효율적인 정규 표현식 복잡성으로 인해 발생하는 취약점입니다. 인증되지 않은 원격 공격자가 긴 CSS 선언을 포함한 HTML을 전송하여 서버의 CPU 자원을 고갈시키고 서비스를 중단시킬 수 있습니다.
💡 쉬운 설명
악의적인 코드가 담긴 긴 스타일 시트를 보내 서버의 계산 능력을 과도하게 사용하게 만드는 공격입니다. 이로 인해 서버가 매우 느려지거나 아예 작동을 멈출 수 있습니다.
🇺🇸 원문 (English)
Inefficient Regular Expression Complexity vulnerability in the CSS scrubber in rrrene html_sanitize_ex allows an unauthenticated remote attacker to exhaust server CPU via a long CSS declaration in sanitized HTML. The declaration regex in HtmlSanitizeEx.Scrubber.CSS.scrub/1 matches the property name with an unbounded greedy [-\w]+ followed by a mandatory :, so a long run of word characters not followed by a colon makes the engine give back one character at a time and retry the colon at every start offset. The work is quadratic in the length of the run, and no length cap is applied to the CSS handed to the scrubber. An 80 KB <style> body costs roughly 2.4 seconds of scheduler time, so a few concurrent requests saturate the BEAM scheduler pool and make the application unresponsive.
The impact is CPU exhaustion only. Nothing is read, modified or disclosed.
This issue affects html_sanitize_ex: from 0.3.1 before 1.4.5 and from 1.5.0-rc.0 before 1.5.3.
📍 영향받는 시스템
html_sanitize_ex: 0.3.1 ~ 1.4.4, 1.5.0-rc.0 ~ 1.5.2
⚔️ 공격 벡터
인증되지 않은 공격자가 조작된 긴 CSS 선언이 포함된 HTML을 서버에 전송
🛡️ 대응 방법
html_sanitize_ex 라이브러리를 1.4.5 또는 1.5.3 이상의 최신 버전으로 업데이트
🔧 검증 코드
출력된 라이브러리 버전이 취약한 범위(1.4.5 미만 또는 1.5.3 미만)에 해당하는지 확인
mix list_dependencies | grep html_sanitize_ex
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
💻 영향받는 소프트웨어
IBM WebSphere Application Server