🇰🇷 한글 설명
Dompdf 3.15 및 이전 버전에서 SVG 이미지를 처리할 때 발생하는 보안 취약점입니다. 공격자가 data: URI를 통해 악성 경로가 포함된 SVG를 삽입하면, 라이브러리가 이를 두 번 처리하는 과정에서 경로 검증을 우회하여 서버의 임의 파일을 읽을 수 있습니다.
💡 쉬운 설명
웹사이트가 HTML을 PDF로 변환할 때, 특수하게 조작된 그림 파일을 이용해 서버 안에 있는 중요한 파일을 몰래 훔쳐볼 수 있는 문제입니다. 그림 파일 안에 숨겨진 명령어를 통해 보안 장치를 무력화하는 방식입니다.
🇺🇸 원문 (English)
Dompdf is an HTML to PDF converter for PHP. In versions 3.15 and prior, aAn attacker who controls the HTML input can bypass this restriction by embedding a target file path inside an SVG image delivered through a data: URI, because dompdf processes the SVG twice and the second pass does not enforce the same protections as the first. When rendering, dompdf hands the SVG to the separate php-svg-lib library with external references forced on, and that library has no knowledge of the chroot directory, blocks only the phar:// scheme, and ultimately reads the referenced file with no path or protocol validation. This lets an external, unauthenticated attacker read arbitrary image files from the server's file system in the default configuration. This issue has been fixed in version 3.16.
📍 영향받는 시스템
Dompdf 3.15 및 그 이전 버전
⚔️ 공격 벡터
조작된 SVG 이미지를 포함한 HTML 입력을 통한 임의 파일 읽기 (LFI)
🛡️ 대응 방법
Dompdf를 최신 버전인 3.16 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 정보가 3.16 미만(예: 3.15.x)이면 취약한 상태입니다.
composer show dompdf/dompdf | grep 'versions'