Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. dompdf/dompdf
  4. ›
  5. CVE-2021-3838

CVE-2021-3838: Deserialization of Untrusted Data in dompdf/dompdf

November 15, 2024 (updated November 18, 2024)

DomPDF before version 2.0.0 is vulnerable to PHAR (PHP Archive) 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.

References

  • github.com/advisories/GHSA-577p-7j7h-2jgf
  • github.com/dompdf/dompdf
  • github.com/dompdf/dompdf/commit/99aeec1efec9213e87098d42eb09439e7ee0bb6a
  • huntr.com/bounties/0bdddc12-ff67-4815-ab9f-6011a974f48e
  • nvd.nist.gov/vuln/detail/CVE-2021-3838

Code Behaviors & Features

Detect and mitigate CVE-2021-3838 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.0.0

Fixed versions

  • 2.0.0

Solution

Upgrade to version 2.0.0 or above.

Impact 9.8 CRITICAL

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

Learn more about CVSS

Weakness

  • CWE-502: Deserialization of Untrusted Data

Source file

packagist/dompdf/dompdf/CVE-2021-3838.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:36 +0000.