🇰🇷 한글 설명
league/commonmark PHP 라이브러리 0.6.0부터 2.9.0 버전 사이에서 발생하는 취약점입니다. 특수하게 제작된 마크다운 입력을 처리할 때 파서가 반복적인 재스캔을 수행하여 이차 시간 복잡도(Quadratic Time Complexity)를 유발합니다. 이로 인해 공격자가 작은 요청만으로도 서버의 CPU 자원을 과도하게 소모하게 만들 수 있습니다.
💡 쉬운 설명
마크다운 문서를 변환할 때 서버가 계산을 너무 많이 하게 만드는 공격입니다. 나쁜 의도를 가진 짧은 문장을 보내 서버의 컴퓨터 성능을 마비시킬 수 있습니다.
🇺🇸 원문 (English)
league/commonmark is a PHP library for parsing and rendering CommonMark Markdown. From 0.6.0 until 2.9.0, specially crafted Markdown lines can cause the parser to have quadratic time complexity when converting, because several parsing paths repeatedly rescan growing portions of a line to translate between character positions and byte positions, and the Autolink extension can also copy and validate the remaining line at every URL-like prefix, allowing an attacker who can submit Markdown for conversion to consume disproportionate CPU time with a comparatively small request. This issue is fixed in 2.9.0.
📍 영향받는 시스템
league/commonmark PHP library (버전 0.6.0 ~ 2.9.0)
⚔️ 공격 벡터
공격자가 마크다운 변환 기능이 있는 서비스에 특수하게 조작된 마크다운 텍스트를 전송
🛡️ 대응 방법
league/commonmark 라이브러리를 2.9.0 이상의 최신 버전으로 업데이트
🔧 검증 코드
출력된 버전이 2.9.0 미만(예: 2.8.x)이면 취약한 상태입니다.
composer show league/commonmark | grep 'versions'