CVE-2021-3838

PHAR Deserialization in dompdf/dompdf

Published Nov 15, 2024 CVSS 3.1 · 9.8 Critical EPSS 1.4% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-3495-1 php-dompdf security update
Debian DLA Debian DLA DLA-3495-2 php-dompdf regression update
Debian DLA Debian DLA DLA-4427-1 php-dompdf security update
EUVD EUVD EUVD-2024-3197 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.
Github GHSA Github GHSA GHSA-577p-7j7h-2jgf Deserialization of Untrusted Data in dompdf/dompdf
Ubuntu USN Ubuntu USN USN-6277-1 Dompdf vulnerabilities
Ubuntu USN Ubuntu USN USN-6277-2 Dompdf vulnerabilities
History
Type Values Removed Values Added
First Time appeared Dompdf Project
Dompdf Project dompdf
CPEs cpe:2.3:a:dompdf_project:dompdf:*:*:*:*:*:*:*:*
Vendors & Products Dompdf Project
Dompdf Project dompdf
Type Values Removed Values Added
First Time appeared Dompdf
Dompdf dompdf
CPEs cpe:2.3:a:dompdf:dompdf:*:beta3:*:*:*:*:*:*
Vendors & Products Dompdf
Dompdf dompdf
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title PHAR Deserialization in dompdf/dompdf
Weaknesses CWE-502
References
Metrics cvssV3_0

{'score': 9.8, 'vector': 'CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
@huntr_ai
Published
Updated
Nov 18, 2024, 2:41 PM
Reserved
Sep 29, 2021, 12:25 AM
Status
Analyzed
Published
Nov 15, 2024, 11:15 AM
Modified
Jun 17, 2026, 4:05 AM