Skip to main content

TCPDF CVE-2026-142210

| EUVDEUVD-2026-141620 MEDIUM
Path Traversal (CWE-22)
2026-12-02 VulnCheck GHSA-9cw8-wcwq-x458
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 attacker-controlled HTML to writeHTML()
  2. Delivery
    Reference local file via CSS url() or img| bullet with uppercase path
  3. Exploit
    Bypass cssSafeMarkupPath() allowlist check
  4. Execution
    File copied to temp dir and embedded in PDF
  5. Impact
    Retrieve generated PDF to disclose file contents

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the host application render attacker-controlled HTML through TCPDF's writeHTML()/writeHTMLCell(), and that the attacker can retrieve the resulting PDF to recover the embedded file. The concrete trigger, per the vendor changelog, is a CSS url() value or a legacy list-style-type:img| (list-image) bullet path whose path contains uppercase characters, which evades the cssSafeMarkupPath() allowlist so the referenced file is copied to a predictable name in the system temp directory and embedded. Limiting factors: the attacker must control HTML input to the markup engine (not a default-exposed function in every deployment), impact is confined to confidentiality/local file disclosure of files readable by the PHP process (no write, code execution, or availability impact), and only files outside K_ALLOWED_PATHS are the target of the bypass. The complete fix is upgrading to 7.0.20 (which removes the temp-dir copy and resolves paths directly and requires tecnickcom/tc-lib-pdf ^8.82.1); the vendor additionally advises keeping K_ALLOWED_PATHS as narrow as possible and not listing the system temp directory when rendering untrusted markup.

Impact

Signals align on a moderate, not critical, priority. The supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) with only VC:L and VI/VA:N yields a 6.9 (medium) score driven entirely by a low-confidentiality impact - local file disclosure - with no integrity or availability effect and no scope change to other systems. The vuln.today decision label is 'this_month', consistent with a bug that warrants scheduled remediation rather than emergency action. There is no CISA KEV listing and no EPSS score in the provided data, so there is no evidence of active or probable near-term exploitation; the only references are the vendor patch/release and a VulnCheck advisory, none of which is working exploit code, so no public exploit is identified. The one caveat is that AV:N/PR:N describes the library's trigger surface (attacker-controlled HTML), but real exploitability depends on the host application actually passing untrusted HTML to writeHTML() - a deployment condition the CVSS vector cannot capture. Net: a genuine issue to patch this month for anyone rendering untrusted HTML with TCPDF, but not a high-urgency, widely-weaponized threat on the available signals.

Exploit ScenarioDerived

A web application uses TCPDF's writeHTML() to turn user-supplied HTML into a PDF (e.g., invoice or report generation). An attacker submits HTML whose CSS url() value or legacy list-image bullet references a sensitive local file outside K_ALLOWED_PATHS using uppercase characters in the path to bypass the cssSafeMarkupPath() allowlist check. TCPDF copies that file into the temporary directory and embeds it into the generated PDF, which the attacker then retrieves to read the file's contents. No public exploit code is identified; the attack follows directly from the vendor's description and patch, and AV:N/AC:L means the crafted markup can be delivered remotely with low complexity.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.7% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Dec 02, 2026

Local file disclosure in TCPDF 7.0.0 through 7.0.19 lets an attacker who controls HTML rendered by writeHTML() or writeHTMLCell() pull files from outside the K_ALLOWED_PATHS allowlist into the generated PDF: a CSS url() value or a legacy list-style-type:img| bullet path containing uppercase characters slips past cssSafeMarkupPath(), so the referenced file is copied to a predictable name in the system temp directory and embedded in the output. Impact is confined to confidentiality of files readable by the PHP process - no write, code execution, or availability effect - and exploitation requires the host application to render untrusted markup and to let the attacker recover the resulting PDF. No public exploit code has been identified at time of analysis; the vendor closed the gap in 7.0.20 by deleting the temp-directory copy and resolving these paths directly through the engine file helper.

RemediationAI

Upgrade to TCPDF 7.0.20, which is the vendor-released patch (upstream commit c8834161b905b21bd8dcc0df6284e0132c5efa05, release https://github.com/tecnickcom/TCPDF/releases/tag/7.0.20), and make sure the dependency resolves to tecnickcom/tc-lib-pdf ^8.82.1, since the engine-level allowlist changes ship there. As a compensating measure the vendor advises keeping K_ALLOWED_PATHS as narrow as the deployment allows and, when rendering untrusted markup, not listing the system temp directory in it - the trade-off is that HTML/CSS/SVG resources that genuinely live in the temp directory will no longer load after 7.0.20, while Image(), ImageSVG() and the other direct API methods retain access to it by design. Also lower K_MAX_REMOTE_SIZE to the expected asset size to limit remote fetch behavior. If upgrading must be staged, treat 7.0.0-7.0.19 deployments that render user-supplied HTML as exposed and reduce what the PHP process can read until the upgrade completes.

Affected VersionsENISA

tcpdf 7.0.0 <7.0.20

Affected Packages

euvd tcpdf fix: 7.0.20

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

TCPDF is a long-standing PHP library for generating PDFs; its writeHTML()/writeHTMLCell() path renders caller-supplied markup, and resources referenced from HTML, CSS, and SVG are normally gated by a realpath()-based allowlist of trusted roots (K_ALLOWED_PATHS) enforced in cssSafeMarkupPath(). This is a CWE-22 path traversal/allowlist bypass: markup-supplied paths that contained uppercase characters were not subjected to the allowlist check, and the legacy handling instead copied the referenced file to a predictable file name inside the system temp directory - a directory that is allowlisted by default - from which the engine then embedded it. Because the copy landed in an allowlisted location under a guessable name, the check downstream of the copy no longer constrained which file could reach the PDF. The fix removes that copy step (the engine resolves the paths directly), stops HTML/CSS/SVG markup from reading resources out of the system temp directory entirely, converts legacy list-style-type:img| bullets into list-style-image:url(path) with the width/height fields ignored, and also routes Image() mask handles and other API reads through the same allowlist. The release additionally bumps the dependency to tecnickcom/tc-lib-pdf ^8.82.1, which applies the path allowlist to PDF import and a host allowlist to signature timestamp requests.

Know when Tcpdf 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:L/VI:N/VA:N/SC:N/SI:N/SA:N
vuln.today AI 5.3 MEDIUM

Attacker-controlled HTML can be delivered remotely with low complexity and no auth or interaction at the library boundary (AV:N/AC:L/PR:N/UI:N); impact is limited local file disclosure, so C:L with I:N/A:N.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/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
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

TCPDF 7.0.0 before 7.0.20 contains an allowlist bypass vulnerability in cssSafeMarkupPath() that allows attackers to embed local files outside K_ALLOWED_PATHS via CSS url() values. Attackers controlling HTML rendered by writeHTML() can reference list-style-image or img| bullet paths containing uppercase characters, causing files to be copied to the temporary directory and embedded in generated PDFs.

Threat Intelligence Overview

EPSS Score
0.7%
Top 47% exploitable
Prevalence
High
widely deployed open-source PHP PDF library used across many web applications
Data Quality
5 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 0.7%
Patch available Yes
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

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

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

More in Tcpdf

View all
CVE-2018-17057 CRITICAL POC
9.8 Sep 14

An issue was discovered in TCPDF before 6.2.22. Rated critical severity (CVSS 9.8), this vulnerability is remotely explo

CVE-2024-56527 HIGH POC
7.5 Dec 27

An issue was discovered in TCPDF before 6.8.0. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitabl

CVE-2024-22641 HIGH POC
7.5 May 28

TCPDF version 6.6.5 and before is vulnerable to ReDoS (Regular Expression Denial of Service) if parsing an untrusted SVG

CVE-2024-22640 HIGH POC
7.5 Apr 19

TCPDF version <=6.6.5 is vulnerable to ReDoS (Regular Expression Denial of Service) if parsing an untrusted HTML page wi

CVE-2024-56521 CRITICAL
9.8 Dec 27

An issue was discovered in TCPDF before 6.8.0. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploi

CVE-2017-6100 HIGH
7.5 Feb 23

tcpdf before 6.2.0 uploads files from the server generating PDF-files to an external FTP. Rated high severity (CVSS 7.5)

CVE-2024-56522 HIGH
7.5 Dec 27

An issue was discovered in TCPDF before 6.8.0. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitabl

CVE-2024-56519 HIGH
7.5 Dec 27

An issue was discovered in TCPDF before 6.8.0. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitabl

CVE-2024-51058 MEDIUM
6.2 Nov 26

Local File Inclusion (LFI) vulnerability has been discovered in TCPDF 6.7.5. Rated medium severity (CVSS 6.2), this vuln

CVE-2024-32489 MEDIUM
6.1 Apr 15

TCPDF before 6.7.4 mishandles calls that use HTML syntax. Rated medium severity (CVSS 6.1), this vulnerability is remote

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