CVE-2024-22640: TCPDF vulnerable to Regular Expression Denial of Service
TCPDF version <= 6.7.4 is vulnerable to ReDoS (Regular Expression Denial of Service) if parsing an untrusted HTML page with a crafted color.
Published Apr 19, 2024 · Updated Nov 4, 2025
Affected packages
tecnickcom/tcpdf
- Ecosystem
- Composer (PHP)
- Affected
- <= 6.7.4
- Fixed in
- 6.7.5
- Check
composer show tecnickcom/tcpdf
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
TCPDF version <= 6.7.4 is vulnerable to ReDoS (Regular Expression Denial of Service) if parsing an untrusted HTML page with a crafted color.
Credited to Starfox64.
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-22640
- https://github.com/tecnickcom/TCPDF
- https://github.com/zunak/CVE-2024-22640
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LIB3R2WB7XPW2I4PGVMZ3VLFLRHOK4RB
- https://github.com/tecnickcom/TCPDF/commit/05f3a28f4a7905019469e040cf77e53d6aa7f679
- https://lists.debian.org/debian-lts-announce/2025/06/msg00004.html
- https://lists.fedoraproject.org/archives/list/[email protected]/message/LIB3R2WB7XPW2I4PGVMZ3VLFLRHOK4RB
- https://github.com/advisories/GHSA-mx3p-fhpw-x6rv
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Composer (PHP) vulnerabilities
All Composer (PHP) entriesCVE-2024-56519
TCPDF lacks SVG sanitization
medium5.3Dec 27, 2024CVE-2024-56521
TCPDF missing certificate validation
high8.2Dec 27, 2024CVE-2024-56522
TCPDF has incorrect comparison
high7.5Dec 27, 2024CVE-2024-56527
TCPDF missing character escape on error messages
medium4.8Dec 27, 2024CVE-2024-51058
TCPDF Local File Inclusion vulnerability
medium6.2Nov 26, 2024CVE-2024-32489
TCPDF Cross-site Scripting vulnerability
medium6.1Apr 15, 2024
