Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2024-22640: n/a

0
High
VulnerabilityCVE-2024-22640cvecve-2024-22640
Published: Fri Apr 19 2024 (04/19/2024, 00:00:00 UTC)
Source: CVE Database V5

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

AILast updated: 11/03/2025, 19:47:21 UTC

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.

Need more detailed analysis?Get Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats