CVE-2021-3838
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.
| Package | Ecosystem | Fixed in |
|---|---|---|
| dompdf/dompdf | Packagist | 2.0.0 |
| dompdf | dompdf | 2.0.0 |
| dompdf/dompdf | dompdf | 2.0.0 |
| dompdf | dompdf_project | 2.0.0 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| dompdf | dompdf/dompdf | unspecified |
| dompdf | dompdf | 0 |
| dompdf | dompdf/dompdf | * |
| dompdf | dompdf | 0 |
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