🇰🇷 한글 설명
league/commonmark PHP 라이브러리의 AttributesExtension에서 href 및 src의 unsafe-link 필터가 우회될 수 있는 취약점입니다. javascript: URL에 탭, 줄바꿈 또는 C0 제어 문자를 삽입하면 브라우저가 이를 무시하고 스크립트를 실행하여 필터링을 우회할 수 있습니다.
💡 쉬운 설명
마크다운을 처리하는 도구에서 보안 필터를 속이는 특수 문자를 사용해 악성 스크립트를 실행할 수 있는 문제입니다. 공격자가 링크에 몰래 코드를 숨겨 사용자의 브라우저에서 실행되게 만들 수 있습니다.
🇺🇸 원문 (English)
league/commonmark is a PHP library for parsing and rendering CommonMark Markdown. From 1.5.0 until 2.9.0, the AttributesExtension's href and src unsafe-link filter can be bypassed by embedding control bytes, such as a tab, carriage return, line feed, or leading C0 control character, in a javascript: URL that browsers discard before parsing the scheme, causing the browser to still execute the script even when the unsafe-link filter is enabled. This issue is fixed in 2.9.0.
📍 영향받는 시스템
league/commonmark 1.5.0 ~ 2.9.0 버전
⚔️ 공격 벡터
javascript: URL 내부에 제어 문자(Tab, CR, LF 등)를 삽입하여 보안 필터를 우회하는 방식
🛡️ 대응 방법
league/commonmark 라이브러리를 2.9.0 이상의 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 2.9.0 미만(1.5.0 이상)인지 확인하여 취약 여부를 판단합니다.
composer show league/commonmark | grep 'versions'