🇰🇷 한글 설명
league/commonmark 라이브러리의 SmartPunctExtension 및 AttributesExtension에서 이차 복잡도 파싱 문제가 발견되었습니다. 공격자가 특수하게 조작된 마크다운 문서를 제출할 경우 CPU 사용량이 급증하여 서비스 거부(DoS) 상태를 유발할 수 있습니다.
💡 쉬운 설명
특수한 규칙이 담긴 마크다운 문서를 입력하면 컴퓨터가 이를 처리하느라 과도하게 힘을 써서 서버가 멈출 수 있는 문제입니다. 악의적인 문서를 통해 웹사이트의 기능을 마비시킬 수 있습니다.
🇺🇸 원문 (English)
The league/commonmark (thephpleague/commonmark) library in versions >= 1.5.0 and < 2.9.1 contains quadratic parsing complexity in its SmartPunctExtension and AttributesExtension. When either extension is explicitly registered on the Environment (they are not enabled by default and are excluded from the standard CommonMark and GitHub-Flavored Markdown converters), an unauthenticated attacker can submit small, specially crafted Markdown documents — such as text alternating with unpaired quotes, contiguous runs of block-level attribute blocks, or repeated class attributes — to trigger disproportionate CPU consumption and cause a denial of service. Fixed in 2.9.1.
📍 영향받는 시스템
league/commonmark versions >= 1.5.0 and < 2.9.1 (SmartPunctExtension 또는 AttributesExtension 사용 시)
⚔️ 공격 벡터
인증되지 않은 공격자가 조작된 마크다운 문서(짝이 맞지 않는 따옴표, 반복되는 속성 등)를 전송
🛡️ 대응 방법
league/commonmark 라이브러리를 2.9.1 버전 이상으로 업데이트
🔧 검증 코드
출력된 버전이 2.9.1 미만인지 확인하여 취약 여부를 판단합니다.
composer show league/commonmark | grep 'versions'