CVE-2022-28368:
Remote code injection in dompdf/dompdf
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.98045%
CWE
Published
4/4/2022
Updated
2/6/2024
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
dompdf/dompdf | composer | < 1.2.1 | 1.2.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from how dompdf processed font URLs in CSS @font-face declarations. The pre-patch code in registerFont() used the remote file's extension (via pathinfo(parse_url($remoteFile, PHP_URL_PATH), PATHINFO_EXTENSION)) to construct the local filename. This allowed attackers to specify a .php URL, which dompdf would then save as a .php file in its writable font directory. The commit 4c70e10 fixed this by hardcoding .ttf extensions for TrueType fonts instead of trusting the remote filename. The function's direct involvement in handling external font resources and the security-focused commit modifying its behavior confirm its role in the vulnerability.