Vulnerability · Published Nov 15, 2024 · Assigned by @huntr_ai

CVE-2021-3838PHAR Deserialization in dompdf/dompdf

Critical 9.8

In plain English

A critical-severity unsafe deserialization in dompdf/dompdf from dompdf. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.4% (higher than 73% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)9.8Critical
Exploit odds (30 days)1.4%top 26.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

DomPDF before version 2.0.0 is vulnerable to PHAR deserialization due to a lack of checking on the protocol before passing it into the file_get_contents() function. An attacker who can upload files of any type to the server can pass in the phar:// protocol to unserialize the uploaded file and instantiate arbitrary PHP objects. This can lead to remote code execution, especially when DOMPdf is used with frameworks with documented POP chains like Laravel or vulnerable developer code.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12php-dompdf2.0.2+dfsg-1DEBIAN-CVE-2021-3838
Packagistdompdf/dompdf2.0.0GHSA-577p-7j7h-2jgf
Ubuntu:22.04:LTSphp-dompdf0.6.2+dfsg-3.1ubuntu0.1USN-6277-2
Ubuntu:22.04:LTSphp-dompdf0.6.2+dfsg-3.1ubuntu0.1UBUNTU-CVE-2021-3838

Affected products (as reported)

VendorProductVersions
dompdf dompdf/dompdf unspecified – before 2.0.0

Weakness: CWE-502 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

References