Remote PHP code injection in Dompdf



Published: 2023-02-16 | Updated: 2023-05-07
Risk High
Patch available YES
Number of vulnerabilities 1
CVE-ID CVE-2022-28368
CWE-ID CWE-94
Exploitation vector Network
Public exploit Public exploit code for vulnerability #1 is available.
Vulnerable software
Subscribe
Dompdf
Web applications / Modules and components for CMS

Vendor dompdf

Security Bulletin

This security bulletin contains one high risk vulnerability.

1) Code Injection

EUVDB-ID: #VU72315

Risk: High

CVSSv3.1: 8.8 [CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P/RL:O/RC:C]

CVE-ID: CVE-2022-28368

CWE-ID: CWE-94 - Improper Control of Generation of Code ('Code Injection')

Exploit availability: Yes

Description

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The vulnerability exists due to improper input validation when handling "src:url" field of an @font-face Cascading Style Sheets (CSS) statement inside an HTML input file. A remote attacker can link a malicious .php file and execute it on the system with installed Dompd when converting HTML to PDF.

Successful exploitation of the vulnerability can allow an attacker to compromise the affected system.

Mitigation

Install updates from vendor's website.

Vulnerable software versions

Dompdf: 0.5.2 - 1.2.0

External links

http://packagist.org/packages/dompdf/dompdf#v1.2.1
http://snyk.io/blog/security-alert-php-pdf-library-dompdf-rce/
http://github.com/dompdf/dompdf/commit/4c70e1025bcd9b7694b95dd552499bd83cd6141d
http://github.com/dompdf/dompdf/pull/2808
http://github.com/dompdf/dompdf/issues/2598


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability. However, proof of concept for this vulnerability is available.



###SIDEBAR###