VDB

CVE-2021-3838

CVE-2021-3838 PUBLISHED CVSS 9.8 CRITICAL

PHAR Deserialization in dompdf/dompdf

Reported by @huntr_ai · Published November 15, 2024

dompdf/dompdf is fixed in 2.0.0 (Packagist)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
dompdf/dompdfPackagist2.0.0
dompdfdompdf2.0.0
dompdf/dompdfdompdf2.0.0
dompdfdompdf_project2.0.0

Risk scores

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

Affected products

VendorProductVersions
dompdfdompdf/dompdfunspecified
dompdfdompdf0
dompdfdompdf/dompdf*
dompdfdompdf0

Timeline

  • Nov 15, 2024 CVE Published
  • Nov 15, 2024 PoC Published (2 in total, the first dated here)
  • Nov 16, 2024 EPSS Score (30 in total, the first dated here)
  • Nov 19, 2024 CVE Updated
  • Mar 17, 2026 Security Advisory
  • Jul 25, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2021-3838
vulnetix vdb fixes CVE-2021-3838

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-3838/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›