CVE-2022-28368 in dompdf project dompdf
LogPulse has a published detection rule for this CVE: it raises a notable when someone tries to exploit it.
What the vulnerability is
Dompdf 1.2.1 allows remote code execution via a .php file in the src:url field of an @font-face Cascading Style Sheets (CSS) statement (within an HTML input file).
Affected software: dompdf project dompdf
Scores
- CVSS: 9.8 (critical)
- EPSS: 83.94% chance of exploitation in the next 30 days
- CISA KEV: Not listed
- Published: 2022-04-03
What LogPulse has for it
- Detection rule: Yes, published
- Agent check (vulnerable version): No
- Mitigation: Yes, see below
How to mitigate it
Upgrade dompdf and turn off remote resources
Patch or upgrade. Current dompdf releases keep only font extensions in the font cache, and with isRemoteEnabled off dompdf will not fetch attacker fonts at all, which closes the code execution in CVE-2022-28368.
Applies to: dompdf 1.2.1 and earlier with remote resources enabled.
- Find the dompdf version with composer show dompdf/dompdf.
- Run composer update dompdf/dompdf to the latest release (2.0.0 or later).
- Set isRemoteEnabled to false in the dompdf options unless the application needs remote images.
- Delete any .php files from the dompdf lib/fonts folder and make that folder non-executable in the web server.
Sources:
Source data: NIST NVD, CISA KEV and FIRST EPSS. LogPulse processes new CVEs every hour.
We build every detection with great care, but no two environments are the same. Log sources, parsing and configuration differ, so test a detection in your own environment before you rely on it.