CVE-2019-1000005 mPDF Unsafe Deserialization
Attackers can achieve arbitrary code execution and file writes in mPDF by triggering PDF generation with a crafted PHAR image path.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2019-1000005?
CVE-2019-1000005 is a high-severity unsafe deserialization vulnerability in n/a, published on 4 Feb 2019. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
mPDF version 7.1.7 and earlier contains a CWE-502: Deserialization of Untrusted Data vulnerability in getImage() method of Image/ImageProcessor class that can result in Arbitry code execution, file write, etc.. This attack appears to be exploitable via attacker must host crafted image on victim server and trigger generation of pdf file with content <img src="phar://path/to/crafted/image">. This vulnerability appears to have been fixed in 7.1.8.
Weakness: CWE-502
Which versions are affected by CVE-2019-1000005?
2 open source packages ship an affected version, including mpdf/mpdf. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
mpdf/mpdf Packagist | All versions | 7.1.8 |
mpdf/mpdf Packagist | All versions | 7.1.8 |
Products include Mpdf Project Mpdf.
How do I fix CVE-2019-1000005?
Upgrade mpdf/mpdf to 7.1.8 or later.
Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.
Is CVE-2019-1000005 being exploited?
There is no known exploitation of CVE-2019-1000005 in the wild and no public exploit code.
Other vulnerabilities in n/a
Sources
Also known as GHSA-3cwc-m7c2-qr86.