🇰🇷 한글 설명
Dompdf 3.15 및 이전 버전에서 CSS @font-face 지시문을 조작하여 파일 존재 여부를 확인하는 File Existence Oracle 공격이 가능합니다. 공격자가 file:// 프로토콜을 사용하여 로컬 파일을 반복 참조하게 함으로써 PHP 메모리 고갈을 유도하고, 파일 존재 여부에 따른 동작 차이를 통해 서버 내 민감한 파일의 존재를 파악할 수 있습니다.
💡 쉬운 설명
공격자가 특수한 코드를 보내 서버에 특정 파일이 있는지 없는지를 알아낼 수 있는 보안 약점입니다. 파일이 있으면 서버 메모리를 가득 채워 오류를 일으키고, 없으면 바로 반응이 달라지는 점을 이용합니다.
🇺🇸 원문 (English)
Dompdf is an HTML to PDF converter for PHP. Versions 3.15 and prior are vulnerable to a File Existence Oracle attack through the manipulation of the CSS @font-face directive. By providing malicious HTML that references local files via the file:// protocol repeatedly, an attacker can trigger PHP memory exhaustion. Because Dompdf behaves differently depending on whether a referenced local file exists (an existing file is processed repeatedly until it triggers an "Allowed memory size exhausted" crash, whereas a missing file fails fast or is ignored and never hits the memory limit), an attacker can use this observable discrepancy as an oracle to enumerate sensitive files on the server regardless of CHROOT restrictions. Exploitation requires the attacker to supply unrestricted or unsanitized HTML in a request that permits large data, plus a configuration where Dompdf's memory limit is low enough to be exhausted (with $_dompdf_show_warnings=true making the overflow easier to reach). This issue has been fixed in version 3.16.
📍 영향받는 시스템
Dompdf 3.15 및 그 이전 버전
⚔️ 공격 벡터
검증되지 않은 HTML을 통해 CSS @font-face 내 file:// 프로토콜을 이용한 메모리 고갈 유도
🛡️ 대응 방법
Dompdf를 3.16 버전 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 3.16 미만(예: 3.15.x)이면 취약한 상태입니다.
composer show dompdf/dompdf | grep 'versions'