🇰🇷 한글 설명
Mistune 3.3.0 미만 버전에서 발생하는 CPU 고갈 서비스 거부(DoS) 취약점입니다. Markdown 파싱 과정 중 parse_link_text 함수가 연속된 '[' 문자를 처리할 때 재귀적인 정규식 검색을 수행하여 시간 복잡도가 O(n²)으로 급증합니다. 공격자가 조작된 짧은 Markdown 입력을 제공하면 서버의 CPU 자원을 과도하게 점유할 수 있습니다.
💡 쉬운 설명
특정한 모양의 글자를 입력하면 컴퓨터가 이를 처리하느라 과도하게 힘을 써서 시스템이 느려지거나 멈추게 만드는 공격입니다. 아주 짧은 글자만으로도 서버를 마비시킬 수 있습니다.
🇺🇸 원문 (English)
Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.3.0, Mistune is vulnerable to a CPU exhaustion DoS due to superlinear (approximately O(n²)) behavior in parse_link_text. When parsing Markdown containing many consecutive [ characters, parse_link_text repeatedly scans the input using a regex search inside a loop. Each iteration re-scans a large portion of the remaining string, resulting in quadratic-time behavior. An attacker-controlled Markdown input can therefore trigger excessive CPU usage with a very small payload. This vulnerability is fixed in 3.3.0.
📍 영향받는 시스템
Mistune Python library versions prior to 3.3.0
⚔️ 공격 벡터
공격자가 조작된 Markdown 텍스트(연속된 '[' 포함)를 입력값으로 전달하여 서버의 CPU를 고갈시킴
🛡️ 대응 방법
Mistune 라이브러리를 3.3.0 버전 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 3.3.0 미만이면 취약한 상태이며, 3.3.0 이상이면 안전합니다.
pip show mistune | grep Version