Deserialization of Untrusted Data Affecting php-dompdf package, versions <2.0.2+dfsg-1


Severity

Recommended
0.0
critical
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
1.43% (72nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-ECHOLATEST-PHPDOMPDF-18388470
  • published29 Jul 2026
  • disclosed15 Nov 2024

Introduced: 15 Nov 2024

CVE-2021-3838  (opens in a new tab)
CWE-502  (opens in a new tab)

How to fix?

Upgrade Echo:latest php-dompdf to version 2.0.2+dfsg-1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream php-dompdf package and not the php-dompdf package as distributed by Echo. See How to fix? for Echo:latest relevant fixed versions and status.

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.

CVSS Base Scores

version 3.1