CVE-2019-1000005: Mpdf/mpdf MPDF Unsafe Deserialization Vulnerability
HIGHCVE-2019-1000005 is a HIGH (CVSS 8.8) mpdf unsafe deserialization vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Mpdf/mpdf libraries in the Packagist ecosystem. The issue involves mpdf unsafe deserialization. Remediation is available by upgrading affected packages to version 7.1.8.
CVE-2019-1000005 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2019-1000005
To remediate this vulnerability, upgrade all affected Mpdf/mpdf dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade mpdf/mpdf to 7.1.8
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for mpdf/mpdf
How to Check if You Are Affected
To determine whether your application is affected by CVE-2019-1000005, inspect your project dependencies for Mpdf/mpdf:
inspect dependencies for mpdf/mpdf
Analyze the terminal output to locate any version of Mpdf/mpdf in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.1.8), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Mpdf/mpdf, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2019-1000005 Affected Mpdf/mpdf Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mpdf/mpdf
|
Packagist |
< 7.1.8
|
7.1.8
|
References
Frequently Asked Questions
What is CVE-2019-1000005?
Which Mpdf/mpdf versions are affected?
What version fixes CVE-2019-1000005?
Is mpdf/mpdf affected?
What is the CVSS score of CVE-2019-1000005?
What CWE is associated with CVE-2019-1000005?
How can I check Packagist dependencies for CVE-2019-1000005?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3cwc-m7c2-qr86",
"modified" : "2023-09-28T20:39:16Z",
"published" : "2022-05-14T01:33:54Z",
"aliases" : [ "CVE-2019-1000005" ],
"summary" : "mPDF Unsafe Deserialization",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "mpdf/mpdf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "7.1.8"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 7.1.7"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-1000005"
}, {
"type" : "WEB",
"url" : "https://github.com/mpdf/mpdf/issues/949"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mpdf/mpdf"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-502" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-07-19T21:15:29Z",
"nvd_published_at" : "2019-02-04T21:29:00Z"
}
}