AploSec / Disclosures / CVE-2026-142210
TCPDF 7.0.0 before 7.0.20 Local File Allowlist Bypass via writeHTML() CSS url()
CVE-2026-142210 · published 2026-12-02
In plain words: this type of bug lets someone read or write files outside the folder they should be limited to (path traversal). A fixed release is listed.
Summary
CVE-2026-142210 affects TCPDF (Packagist) >= 7.0.0, < 7.0.20: Local File Allowlist Bypass via writeHTML() CSS url() (CWE-22). Fixed in 7.0.20. CVSS 4.0 base score 6.9 (Medium), assigned by VulnCheck. Published 2026-12-02 by VulnCheck. Credit: Zachariah Mithani (AploSec).
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.
Evidence
Reported to the maintainer. The public advisory and references below describe the evidence and preconditions; reporting status alone does not establish independent reproduction.
Remediation
Upgrade TCPDF to 7.0.20 or later. Releases in the affected range (>= 7.0.0, < 7.0.20) are vulnerable. See the linked advisory for details on affected release lines.
Timeline
- 2026-12-02 CVE published
References
- VulnCheck advisoryhttps://www.vulncheck.com/advisories/tcpdf-7.0.0-before-7.0.20-local-file-allowlist-bypass-via-writehtml-css-url
- Vulnerable codehttps://github.com/tecnickcom/TCPDF/blob/7.0.19/tcpdf.php#L7525-L7539
- Fix commithttps://github.com/tecnickcom/TCPDF/commit/c8834161b905b21bd8dcc0df6284e0132c5efa05
- Releasehttps://github.com/tecnickcom/TCPDF/releases/tag/7.0.20
- CVE recordhttps://www.cve.org/CVERecord?id=CVE-2026-142210
- NVD recordhttps://nvd.nist.gov/vuln/detail/CVE-2026-142210
- Severity
- Medium 6.9CVSS 4.0, scored by VulnCheck in the CVE record
- Package
- TCPDF
- Ecosystem
- Packagist
- Affected
- >= 7.0.0, < 7.0.20
- Fixed
- 7.0.20
- Weakness
- CWE-22
- CNA
- VulnCheck
- Credit
- Zachariah Mithani (AploSec)finder