cve.bz

CVE-2021-3838 dompdf project dompdf: Deserialization of Untrusted Data

9.8 criticalExploit referenceEPSS 1.4%Fix available

Critical (9.8) in dompdf project dompdf. EPSS 1.4% estimated probability of exploitation activity in the next 30 days. Fixed in dompdf/dompdf 2.0.0.

On this page
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.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
1.4% (unchanged from 1.4% a week ago; 1.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 74th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: yes · Technical impact: total, assessed 2024-11-18. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-502 Deserialization of Untrusted Data
OWASP Top 10
A08:2025 Software or Data Integrity Failures
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-3838 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-3838?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-3838?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-3838 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
dompdf/dompdfbefore 2.0.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-577p-7j7h-2jgfPackagistdompdf/dompdf<2.0.02.0.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10php-dompdf0.6.2+dfsg-3+deb10u1DLA-3495-1
Debian10php-dompdf0.6.2+dfsg-3+deb10u2DLA-3495-2
Debian11php-dompdf0.6.2+dfsg-3.1+deb11u1DLA-4427-1
Debian12php-dompdf2.0.2+dfsg-1DEBIAN-CVE-2021-3838
Ubuntu20.04:LTSphp-dompdf0.6.2+dfsg-3ubuntu0.20.04.1UBUNTU-CVE-2021-3838 USN-6277-1
Ubuntu22.04:LTSphp-dompdf0.6.2+dfsg-3.1ubuntu0.1UBUNTU-CVE-2021-3838 USN-6277-2
UbuntuPro:16.04:LTSphp-dompdf0.6.1+dfsg-2ubuntu1+esm1UBUNTU-CVE-2021-3838 USN-6277-1
UbuntuPro:18.04:LTSphp-dompdf0.6.2+dfsg-3ubuntu0.18.04.1~esm1UBUNTU-CVE-2021-3838 USN-6277-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Attack patterns (CAPEC)

  • CAPEC-586 Object Injection Likelihood: Medium · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON