Exploit database

Vulnerability

CVE-2022-28368

Vulnerability details

Score
9.8
Severity
critical

CVSS 3.1 · NVD

Vector string

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

Description

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).

CVE Program

Exploit source choices

4 sources
Dompdf RCE via Malicious Font Caching (CVE-2022-28368)
MSF-multi--http--dompdf_rce_cve_2022_28368MetasploitPHP / remote

This module exploits CVE-2022-28368, a Remote Code Execution vulnerability in dompdf versions prior to 1.2.1. The vulnerability exists because dompdf preserves the original file extension when caching fonts downloaded via CSS @font-face rules. By pointing a @font-face src to a .php file containing a valid TrueType font header with embedded PHP code, the file is saved in the dompdf font cache (lib/fonts/) with its .php extension intact. The cached file can then be executed by directly requesting it from the web server. For dompdf versions <= 0.8.5, remote font loading works regardless of the $isRemoteEnabled setting. For versions 0.8.6 through 1.2.0, the $isRemoteEnabled option must be set to true. This module requires the ability to inject HTML/CSS into the data processed by dompdf (e.g., via an XSS, a user-controlled form field, or a direct parameter) and that the dompdf font cache directory is web-accessible.

2022-04-05dompdf_rce_cve_2022_28368.rb
rvzsec/cve-2022-28368
GH-c2f7b07f606a1c9168e25b9ef50a3755GitHubUnofficial GitHub source

Dompdf RCE PoC Exploit - CVE-2022-28368

2023-02-133 files · 16 stars