🇰🇷 한글 설명
Dompdf 3.15 및 이전 버전에서 리소스 고갈을 통한 서비스 거부(DoS) 취약점이 발견되었습니다. 공격자가 특정 CSS 컨테이너와 Base64로 인코딩된 고엔트로피 이미지를 포함한 HTML을 제공하면, 초기 차원 검사를 우회하여 PHP 프로세스를 중단시킬 수 있습니다. 이 취약점은 버전 3.16에서 수정되었습니다.
💡 쉬운 설명
매우 큰 크기의 이미지가 포함된 특수한 HTML 파일을 보내 웹 서버의 메모리와 CPU를 과도하게 사용하여 서버를 멈추게 만드는 공격입니다. 사용자가 입력한 HTML을 PDF로 변환하는 기능을 가진 웹사이트가 위험할 수 있습니다.
🇺🇸 원문 (English)
Dompdf is an HTML to PDF converter for PHP. Versions 3.15 and prior are vulnerable to a Denial of Service (DoS) attack via resource exhaustion. An attacker can crash the PHP process by providing a specially crafted HTML document containing a single image with massive dimensions (e.g., 30,000x30,000 pixels). While Dompdf implements internal checks to validate image dimensions, these can be bypassed by using a high-entropy image (such as random noise) encoded in Base64 and wrapped in specific CSS containers. The vulnerability exists because the dimension validation happens early, but the resource allocation for calculating the object's bounding box and internal buffers during the rendering phase does not strictly limit the cumulative CPU time or memory usage for a single object that has passed the initial check. An unauthenticated remote attacker can cause a complete Denial of Service on the web server by submitting a crafted HTML string. This affects any application that allows users to provide HTML content or URLs that are subsequently converted to PDF using Dompdf. This issue has been fixed in version 3.16.
📍 영향받는 시스템
Dompdf 3.15 및 그 이전 버전
⚔️ 공격 벡터
특수하게 제작된 대형 이미지와 CSS가 포함된 HTML 문서를 제출하여 리소스 고갈 유도
🛡️ 대응 방법
Dompdf를 최신 버전인 3.16 이상으로 업데이트
🔧 검증 코드
출력된 버전 정보가 3.16 미만(예: 3.15.x)이면 취약한 상태입니다.
composer show dompdf/dompdf | grep 'versions'