CVE-2026-142210: TCPDF 7.0.0 before 7.0.20 Local File Allowlist Bypass via writeHTML() CSS url()
TCPDF 7.0.0 before 7.0.20 contains an allowlist bypass vulnerability in cssSafeMarkupPath() that allows attackers to embed local files outside KALLOWEDPATHS 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.
Affected Software
Event History
Frequently Asked Questions
Who is exposed to this issue?
Applications using TCPDF 7.0.0 through 7.0.19 are exposed if they render attacker-controlled HTML with writeHTML(). The issue is relevant where the process generating PDFs can read local files that should be restricted by K_ALLOWED_PATHS.
What does an attacker need to exploit it?
An attacker needs control over HTML passed to writeHTML(). They can use CSS url() values in list-style-image or img/bullet paths containing uppercase characters to reference local files outside the configured allowlist.
Is authentication or user interaction required?
No authentication or user interaction is required by the vulnerability itself. Exploitation depends on the attacker being able to supply HTML that the application renders with writeHTML().
How can I determine whether my deployment is affected?
Check whether the application uses composer/tecnickcom/tcpdf at a version from 7.0.0 through 7.0.19 and uses writeHTML() on untrusted or attacker-influenced HTML. Also review whether K_ALLOWED_PATHS is relied on to prevent access to local files during PDF generation.
What should be done if an upgrade cannot be applied immediately?
Do not render untrusted HTML with writeHTML(), or remove and reject CSS url() values and list-style-image or img/bullet paths from attacker-controlled content. Run PDF generation with access only to files that are safe to disclose, since referenced files may be copied into the temporary directory and embedded in generated PDFs.