CVE-2024-22640: Tecnickcom/tcpdf Denial of Service Vulnerability
MODERATECVE-2024-22640 is a MODERATE denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Tecnickcom/tcpdf libraries in the Packagist ecosystem. The issue involves tcpdf vulnerable to regular expression denial of service. Remediation is available by upgrading affected packages to version 6.7.5.
CVE-2024-22640 at a Glance
How to Fix CVE-2024-22640
To remediate this vulnerability, upgrade all affected Tecnickcom/tcpdf dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade tecnickcom/tcpdf to 6.7.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for tecnickcom/tcpdf
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-22640, inspect your project dependencies for Tecnickcom/tcpdf:
inspect dependencies for tecnickcom/tcpdf
Analyze the terminal output to locate any version of Tecnickcom/tcpdf in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.7.5), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Tecnickcom/tcpdf, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-22640 Affected Tecnickcom/tcpdf Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
tecnickcom/tcpdf
|
Packagist |
< 6.7.5
|
6.7.5
|
References
Frequently Asked Questions
What is CVE-2024-22640?
Which Tecnickcom/tcpdf versions are affected?
What version fixes CVE-2024-22640?
Is tecnickcom/tcpdf affected?
What CWE is associated with CVE-2024-22640?
How can I check Packagist dependencies for CVE-2024-22640?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mx3p-fhpw-x6rv",
"modified" : "2025-11-04T19:45:34Z",
"published" : "2024-04-19T18:31:11Z",
"aliases" : [ "CVE-2024-22640" ],
"summary" : "TCPDF vulnerable to Regular Expression Denial of Service",
"details" : "TCPDF version <= 6.7.4 is vulnerable to ReDoS (Regular Expression Denial of Service) if parsing an untrusted HTML page with a crafted color.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "tecnickcom/tcpdf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.7.5"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 6.7.4"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-22640"
}, {
"type" : "WEB",
"url" : "https://github.com/tecnickcom/TCPDF/commit/05f3a28f4a7905019469e040cf77e53d6aa7f679"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/tecnickcom/TCPDF"
}, {
"type" : "WEB",
"url" : "https://github.com/zunak/CVE-2024-22640"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2025/06/msg00004.html"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LIB3R2WB7XPW2I4PGVMZ3VLFLRHOK4RB"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LIB3R2WB7XPW2I4PGVMZ3VLFLRHOK4RB"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1333" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-19T19:49:13Z",
"nvd_published_at" : "2024-04-19T16:15:09Z"
}
}