CVE-2024-22640: n/a
TCPDF version <=6.6.5 is vulnerable to ReDoS (Regular Expression Denial of Service) if parsing an untrusted HTML page with a crafted color.
AI Analysis
Technical Summary
CVE-2024-22640 identifies a Regular Expression Denial of Service (ReDoS) vulnerability in TCPDF, an open-source PHP library widely used for generating PDF documents from HTML content. Versions up to and including 6.6.5 are affected. The vulnerability arises from the way TCPDF parses color attributes within HTML input using inefficient regular expressions. An attacker can craft a malicious HTML page with a specially designed color value that triggers excessive backtracking in the regex engine, leading to high CPU consumption and potential denial of service. This attack vector requires no authentication or user interaction and can be executed remotely by submitting the crafted HTML to a vulnerable TCPDF instance. The vulnerability impacts availability (denial of service) but does not compromise confidentiality or integrity of data. No patches or fixes have been officially released at the time of publication, and no known exploits have been observed in the wild. The CVSS v3.1 base score is 7.5, reflecting network attack vector, low attack complexity, no privileges required, no user interaction, and impact limited to availability. The underlying CWE is CWE-1333, which relates to ReDoS issues caused by vulnerable regular expressions. This vulnerability is particularly relevant for web applications and services that convert untrusted or user-supplied HTML content into PDFs using TCPDF, as they may be exposed to denial of service attacks that degrade or disrupt service availability.
Potential Impact
For European organizations, the primary impact of CVE-2024-22640 is on service availability. Organizations relying on TCPDF to generate PDFs from untrusted or user-supplied HTML content may experience denial of service conditions, leading to degraded performance or complete service outages. This can affect customer-facing portals, document management systems, and automated reporting tools, potentially disrupting business operations and damaging reputation. While confidentiality and integrity are not directly impacted, the availability disruption can have cascading effects, such as delayed transactions, loss of productivity, and increased operational costs. Sectors with high document processing demands, including finance, healthcare, government, and legal services, are particularly vulnerable. Additionally, denial of service attacks can be used as a smokescreen for other malicious activities or to exhaust resources during broader cyber campaigns. The lack of authentication requirements and ease of exploitation increase the risk of widespread attacks, especially against publicly accessible services.
Mitigation Recommendations
To mitigate CVE-2024-22640, European organizations should first identify all instances of TCPDF version 6.6.5 or earlier in their environments. Since no official patch is currently available, organizations should implement input validation and sanitization to restrict or cleanse HTML content before it is processed by TCPDF, focusing on color attributes and other potentially vulnerable inputs. Employing strict whitelisting of allowed HTML tags and attributes can reduce attack surface. Rate limiting and request throttling on endpoints that accept HTML input can help mitigate the impact of potential ReDoS attempts by limiting resource exhaustion. Monitoring CPU and memory usage of services using TCPDF can provide early detection of abnormal resource consumption indicative of an attack. Where feasible, consider isolating PDF generation processes in separate containers or sandboxes to contain potential denial of service effects. Stay alert for official patches or updates from TCPDF maintainers and plan prompt deployment once available. Additionally, consider alternative PDF generation libraries with better resilience against ReDoS vulnerabilities if immediate patching is not possible.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Italy, Spain
CVE-2024-22640: n/a
Description
TCPDF version <=6.6.5 is vulnerable to ReDoS (Regular Expression Denial of Service) if parsing an untrusted HTML page with a crafted color.
AI-Powered Analysis
Technical Analysis
CVE-2024-22640 identifies a Regular Expression Denial of Service (ReDoS) vulnerability in TCPDF, an open-source PHP library widely used for generating PDF documents from HTML content. Versions up to and including 6.6.5 are affected. The vulnerability arises from the way TCPDF parses color attributes within HTML input using inefficient regular expressions. An attacker can craft a malicious HTML page with a specially designed color value that triggers excessive backtracking in the regex engine, leading to high CPU consumption and potential denial of service. This attack vector requires no authentication or user interaction and can be executed remotely by submitting the crafted HTML to a vulnerable TCPDF instance. The vulnerability impacts availability (denial of service) but does not compromise confidentiality or integrity of data. No patches or fixes have been officially released at the time of publication, and no known exploits have been observed in the wild. The CVSS v3.1 base score is 7.5, reflecting network attack vector, low attack complexity, no privileges required, no user interaction, and impact limited to availability. The underlying CWE is CWE-1333, which relates to ReDoS issues caused by vulnerable regular expressions. This vulnerability is particularly relevant for web applications and services that convert untrusted or user-supplied HTML content into PDFs using TCPDF, as they may be exposed to denial of service attacks that degrade or disrupt service availability.
Potential Impact
For European organizations, the primary impact of CVE-2024-22640 is on service availability. Organizations relying on TCPDF to generate PDFs from untrusted or user-supplied HTML content may experience denial of service conditions, leading to degraded performance or complete service outages. This can affect customer-facing portals, document management systems, and automated reporting tools, potentially disrupting business operations and damaging reputation. While confidentiality and integrity are not directly impacted, the availability disruption can have cascading effects, such as delayed transactions, loss of productivity, and increased operational costs. Sectors with high document processing demands, including finance, healthcare, government, and legal services, are particularly vulnerable. Additionally, denial of service attacks can be used as a smokescreen for other malicious activities or to exhaust resources during broader cyber campaigns. The lack of authentication requirements and ease of exploitation increase the risk of widespread attacks, especially against publicly accessible services.
Mitigation Recommendations
To mitigate CVE-2024-22640, European organizations should first identify all instances of TCPDF version 6.6.5 or earlier in their environments. Since no official patch is currently available, organizations should implement input validation and sanitization to restrict or cleanse HTML content before it is processed by TCPDF, focusing on color attributes and other potentially vulnerable inputs. Employing strict whitelisting of allowed HTML tags and attributes can reduce attack surface. Rate limiting and request throttling on endpoints that accept HTML input can help mitigate the impact of potential ReDoS attempts by limiting resource exhaustion. Monitoring CPU and memory usage of services using TCPDF can provide early detection of abnormal resource consumption indicative of an attack. Where feasible, consider isolating PDF generation processes in separate containers or sandboxes to contain potential denial of service effects. Stay alert for official patches or updates from TCPDF maintainers and plan prompt deployment once available. Additionally, consider alternative PDF generation libraries with better resilience against ReDoS vulnerabilities if immediate patching is not possible.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- mitre
- Date Reserved
- 2024-01-11T00:00:00.000Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 690904b000ff46172d4a0e2c
Added to database: 11/3/2025, 7:38:24 PM
Last enriched: 11/3/2025, 7:47:21 PM
Last updated: 11/5/2025, 12:38:03 PM
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-12497: CWE-98 Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') in averta Premium Portfolio Features for Phlox theme
HighCVE-2025-11745: CWE-80 Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) in spacetime Ad Inserter – Ad Manager & AdSense Ads
MediumCVE-2025-58337: CWE-284 Improper Access Control in Apache Software Foundation Apache Doris-MCP-Server
UnknownCVE-2025-12469: CWE-862 Missing Authorization in amans2k FunnelKit Automations – Email Marketing Automation and CRM for WordPress & WooCommerce
MediumCVE-2025-12468: CWE-200 Exposure of Sensitive Information to an Unauthorized Actor in amans2k FunnelKit Automations – Email Marketing Automation and CRM for WordPress & WooCommerce
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.