Home › Vulnerabilities › mPDF
mPDF Through 8.3.2 Flaws Allow Memory Exhaustion and Server-Side Request Forgery
Two medium-severity mPDF vulnerabilities affect versions through 8.3.2: an SVG entity expansion issue that can exhaust PHP memory, and a server-side request forgery flaw reachable through gopher:// and dict:// URLs. The records describe no fixed version or workaround.
What to look into
- 2 vulnerabilities in mPDF: 2 medium (CVSS up to 6.9).
- None of them is known to be exploited yet.
- Start with CVE-2026-142220 (6.9 medium): mPDF through 8.3.2 contains an SVG entity expansion vulnerability in src/Image/Svg.php that allows attackers to exhaust PHP memory by supplying nested entity declarations. Attackers can embed a small… An attacker without an account can exploit this over the network, without any user action.
- 2 of 2 can be attacked over the network without logging in, 2 of them without anyone clicking anything.
- Kinds of flaws: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion'); Server-Side Request Forgery (SSRF).
Key points
- Two MEDIUM vulnerabilities in mPDF through 8.3.2, published by NVD on 2026-12-02.
- CVE-2026-142220 (CVSS 6.9): nested SVG entity expansion can exhaust PHP memory and halt PDF generation.
- CVE-2026-142219 (CVSS 6.3): gopher:// and dict:// URLs can trigger cURL requests to arbitrary internal hosts and ports.
- The records give no fixed version or workaround.
Overview
NVD published two vulnerabilities in mPDF on 2026-12-02, both affecting versions through 8.3.2. The batch contains two different kinds of flaw: a resource exhaustion issue in SVG processing and a server-side request forgery (SSRF) issue in the HTTP client path. Both are rated MEDIUM.
Resource exhaustion through SVG entities
CVE-2026-142220 (CVSS 6.9) affects src/Image/Svg.php. According to the record, an attacker can supply an SVG whose nested entity declarations reference each other repeatedly. When the file is used as an image or inline SVG, the entities expand exponentially and exhaust PHP memory, which stops PDF generation with a fatal error. The record describes a small input causing this effect, so any service that renders untrusted SVG content is the relevant exposure.
Server-side request forgery through cURL
CVE-2026-142219 (CVSS 6.3) concerns CurlHttpClient::sendRequest. The record states that gopher:// and dict:// resource URLs present in rendered HTML or CSS are passed to cURL without CURLOPT_PROTOCOLS being set. This could let an attacker send chosen bytes to arbitrary hosts and ports, with Redis and Memcached given as examples of internal services that could be reached.
Who is affected
The records name mPDF through 8.3.2 as the affected range. They do not state a fixed release, a vendor patch, a workaround, or any detection method, and they do not report exploitation in the wild.
What to do
Check whether mPDF is in use and at what version. Treat any deployment that renders untrusted HTML, CSS or SVG as higher priority, and review whether it can reach internal services over the network.
What to do
- Identify mPDF installations and confirm whether their version is 8.3.2 or earlier.
- Prioritise deployments that render untrusted HTML, CSS or SVG content.
- Check whether the rendering host can reach internal services such as Redis or Memcached, and restrict that access where possible.
The 2 vulnerabilities
- CVE-2026-142220 6.9 mPDF through 8.3.2 contains an SVG entity expansion vulnerability in src/Image/Svg.php that allows attackers to exhaust PHP memory by supplying nested entity declarations. Attackers can embed a small SVG with entities referencing each othe…
- CVE-2026-142219 6.3 mPDF through 8.3.2 contains a server-side request forgery vulnerability that allows attackers to reach internal services by supplying gopher:// or dict:// resource URLs in rendered HTML or CSS. CurlHttpClient::sendRequest passes these URLs…
Frequently asked questions
How many mPDF vulnerabilities were published on December 2, 2026?
2 vulnerabilities: 2 medium, with CVSS scores up to 6.9.
Are any of them being exploited?
None of them is in CISA's Known Exploited Vulnerabilities catalog yet.
Which one should be fixed first?
CVE-2026-142220 (CVSS 6.9): mPDF through 8.3.2 contains an SVG entity expansion vulnerability in src/Image/Svg.php that allows attackers to exhaust PHP memory by supplying nested entity declarations. Attackers can embed a small…