HighGHSA-3cwc-m7c2-qr86CVE-2019-1000005

mPDF Unsafe Deserialization

Published 14 May 2022 · Updated 16 Feb 2024

Is your project on an affected mpdf/mpdf?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Laravel or PHP apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

mpdf/mpdfComposer
Affected
<7.1.8
Fixed in
7.1.8
Update to the fixed version for your release line, for example:composer require mpdf/mpdf:^7.1.8

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.

Is GHSA-3cwc-m7c2-qr86 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected mpdf/mpdf, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.