Skip to main content

mPDF CVE-2026-142220

| EUVDEUVD-2026-141610 MEDIUM
Improper Restriction of Recursive Entity References in DTDs (CWE-776)
2026-12-02 VulnCheck GHSA-9v7p-gwvj-22g6
6.9
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit crafted SVG to PDF-generating endpoint
  2. Exploit
    Parser processes nested entity declarations in Svg.php
  3. Execution
    Entities expand exponentially
  4. Impact
    PHP memory limit exhausted, generation aborts with fatal error

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A02:2025 - Security Misconfiguration
ASVS 5.0
V13 - Configuration XML entity recursion limits
Exploitation Conditions

Exploitation requires the hosting application to pass attacker-controlled SVG content - supplied as an embedded image or inline SVG - into mPDF for rendering; the malicious SVG must contain nested/recursive XML entity declarations. Where the application accepts untrusted SVG without restriction, no authentication or user interaction is needed (PR:N/UI:N). Limiting factors: impact is confined to crashing the individual PDF-generation request via a fatal PHP memory error (availability only, no code execution or data access); applications that never render user-controlled SVG, or that sanitize/disable SVG entity processing upstream, are not exposed. Whether reaching mPDF requires authentication is application-dependent and not determined by the library itself.

Impact

This is a medium-severity denial-of-service issue, not a top-priority emergency. The vuln.today decision label is 'this_month' (not act_now/emergency), and the supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) scores 6.9 with impact limited strictly to availability (VA:L; VC:N/VI:N/VA partial). The network vector with no privileges or user interaction makes it easy to reach in applications that feed attacker-controlled SVG to mPDF, but the ceiling is low: a single PDF-generation request is terminated by a fatal PHP memory error - there is no code execution, no data exposure, and no cross-component scope change (SC/SI/SA:N). No EPSS score, no CISA KEV listing, and no confirmed proof-of-concept exploit are present in the input, so there is no signal of active or widespread exploitation. One signal conflict to flag: the input Tags include 'Information Disclosure', which contradicts both CWE-776 (entity expansion) and the CVSS vector showing only availability impact and zero confidentiality impact - this is a DoS, not an information-disclosure flaw. Overall: a real but bounded availability risk whose priority depends on whether your application exposes mPDF to untrusted SVG input.

Exploit ScenarioDerived

An application uses mPDF to render user-supplied HTML/SVG into PDFs (for example an invoice, report, or avatar-to-PDF feature). An attacker submits a small SVG containing nested entity declarations that reference each other, and when mPDF parses it in src/Image/Svg.php the entities expand exponentially ('billion laughs'), exhausting PHP's memory limit and aborting PDF generation with a fatal error. No public exploit identified at time of analysis, though the technique is well-known and trivial to reproduce.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Dec 02, 2026

Memory exhaustion in mPDF through 8.3.2 lets anyone able to place an SVG into a rendered document crash the PDF-generation request: an SVG containing nested or self-referencing XML entity declarations is expanded exponentially when src/Image/Svg.php parses it, and the request dies with a fatal PHP memory error. The impact is confined to availability of that single PDF job - there is no confidentiality or integrity impact, no code execution and no data access, which matches the assessed vector (AV:N/AC:L/PR:N/UI:N with availability-only, low). Exposure depends entirely on the host application passing attacker-controlled SVG (embedded image or inline markup) into mPDF; authentication requirements are therefore application-dependent, and no public exploit code or confirmed active exploitation is identified at time of analysis (priority: this month, medium severity).

RemediationAI

At the time of analysis no vendor-released fixed version is listed in the available data - the references only point to the vulnerable code at the v8.3.2 tag - so remediation has to start with controlling what reaches the renderer. The most direct control is upstream sanitization: strip or reject DOCTYPE declarations and internal entity definitions from any SVG before handing it to mPDF (for example with a whitelist-based SVG sanitizer or by parsing with entity loading and DTD processing disabled), which defeats the expansion entirely but will break any legitimate SVG that relies on entities or embedded DTDs. Where SVG input cannot be sanitized, restrict who may submit SVG content and prefer rasterising untrusted vector assets to PNG/JPEG before embedding, accepting the loss of vector fidelity. Run PDF generation with a bounded PHP memory_limit and a request timeout so an expansion attempt fails fast as a single failed job rather than degrading the worker pool - a compensating control only, since it does not stop the expansion itself. Applications that never render user-controlled SVG, or that already sanitize or disable SVG entity processing, are not exposed. Track the mpdf repository and the VulnCheck advisory (https://www.vulncheck.com/advisories/mpdf-through-8.3.2-svg-entity-expansion-dos-via-svg-php) for a patched release and upgrade as soon as one is published; planned rather than emergency timing is appropriate given the medium-severity, availability-only impact.

Affected VersionsENISA

mPDF 0 ≤8.3.2

Affected Packages

euvd mpdf no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

mPDF is a PHP library that converts HTML into PDFs, and it renders SVG graphics through src/Image/Svg.php, where the SVG document is handled as XML. The flaw is CWE-776 (Improper Restriction of Recursive Entity References in DTDs, i.e. XML entity expansion), the class behind the classic 'billion laughs' pattern: a DTD internal subset declares entities that reference other entities, so a very small SVG file expands into an exponentially large in-memory document when the parser resolves those references. Because the expansion happens during rendering in the PHP process, the practical outcome is memory exhaustion and a fatal error that aborts PDF generation. The affected range from CPE/EUVD data covers mPDF (cpe:2.3:a:mpdf:mpdf) from version 0 through 8.3.2 inclusive; the CVE record points at the entity-handling code at src/Image/Svg.php lines 3116-3123 in the v8.3.2 tag. The CVSS 4.0 score of 6.9 reflects network reachability with no privileges or user interaction and low availability impact; the exploitability of that reachability is inherited from the host application, since the library only sees SVG that the application forwards to it. Note that the supplied tag list includes 'Information Disclosure', but neither the description nor the assessed vector supports any data disclosure - the demonstrated effect is denial of service only.

Know when Mpdf gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
vuln.today AI 5.3 MEDIUM

Remotely reachable via untrusted SVG with low complexity and no auth in exposed apps; impact is a single aborted PDF-generation process, so A:L and C:N/I:N.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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 other repeatedly as an image or inline SVG, causing exponential expansion that terminates PDF generation with a fatal error.

Threat Intelligence Overview

Prevalence
Medium
popular PHP HTML-to-PDF library, widely used but embedded per-application
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS N/A
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy