🔍 CVE-2026-59941

7.5
CVSS Score
HIGH
2026-07-28
2026-08-04 16:34
✅ 완료

🇰🇷 한글 설명

PHP용 HTML-to-PDF 변환기인 Dompdf 3.15 및 이전 버전에서 BMP 이미지 처리 시 발생하는 취약점입니다. 이미지 헤더에 선언된 크기만 믿고 실제 데이터 검증 없이 메모리를 할당하여, 매우 작은 파일로도 과도한 메모리와 CPU 자원을 소모하게 만드는 서비스 거부(DoS) 공격이 가능합니다.

💡 쉬운 설명

가짜 크기 정보를 담은 아주 작은 이미지 파일을 보내서 서버의 메모리를 순식간에 가득 채워 서버를 멈추게 만드는 공격입니다. 공격자는 아주 적은 노력으로 서버를 마비시킬 수 있습니다.

🇺🇸 원문 (English)

Dompdf is an HTML to PDF converter for PHP. Versions 3.15 and prior accept a BMP image and generates a PDF-compatible PNG based only on its declared header dimensions and never bounds width × height before the image is converted through GD. A 58-byte BMP whose header declares e.g. 6000×6000 is accepted and later drives imagecreatetruecolor($width, $height) (and PHP's native BMP decoder) to allocate the full pixel canvas. A payload can fit in a single HTTP request: the BMP can be inlined as a data:image/bmp;base64,… URI inside attacker-controlled HTML, so no upload, no remote fetch, and no chroot-reachable file is required. I measured a 169-byte request driving a dompdf render to ~412 MB peak RSS and ~4.8 s of CPU/wall time, versus ~34 MB for an identically-sized benign request — roughly a 12× memory amplification per request, repeatable and unauthenticated. This issue has been fixed in version 3.16.

📍 영향받는 시스템

Dompdf 3.15 및 그 이전 모든 버전

⚔️ 공격 벡터

공격자가 제어 가능한 HTML 내에 Base64로 인코딩된 조작된 BMP 이미지를 삽입하여 HTTP 요청을 전송

🛡️ 대응 방법

Dompdf를 버전 3.16 이상으로 업데이트

🔧 검증 코드

출력된 버전 정보가 3.16 미만(예: 3.15.x)이면 취약한 상태입니다.

Shell / Script
composer show dompdf/dompdf | grep 'versions'

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

💻 영향받는 소프트웨어

PHP