Cloudanix VulnDB

CVE-2024-22640

High · 7.5

CVSS

7.5

EPSS

1.3%

Published

Apr 19, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A problem in a common PDF-making tool can let attackers slow down or crash systems that turn web content into documents by feeding it specially made color information.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Denial Of Service
Component
Library
Class
Denial of service
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The flaw permits catastrophic backtracking in a regular expression during color parsing of untrusted HTML, resulting in excessive CPU consumption and potential denial of service.

Why it matters to the business

Services that convert user-supplied HTML into PDFs can become slow or unavailable, interrupting document generation workflows and increasing infrastructure load.

How an attack unfolds

An attacker supplies an HTML document containing a maliciously crafted color value to any application using the vulnerable library version; the color parser's regex engine enters prolonged backtracking, exhausting server resources without authentication or user interaction.

How to fix it

Upgrade TCPDF to the latest version greater than 6.6.5; if immediate upgrade is not possible, implement input sanitization to reject or normalize color values before parsing.

How to confirm the fix worked

Reproduce PDF generation using previously triggering color patterns and confirm processing completes within expected time bounds; review release notes for the resolved color regex.

Typical attack path

  1. Locate an endpoint or feature that accepts HTML and invokes TCPDF for PDF rendering
  2. Craft a color attribute containing a string engineered for regex backtracking
  3. Submit the HTML payload through the normal input channel
  4. Trigger repeated processing to sustain resource exhaustion

How to detect it

Review application and web server logs for PDF generation requests that exhibit abnormally long execution times or high CPU; correlate with incoming HTML containing unusual color strings.

What your security team should do

  • Prioritize upgrade of the TCPDF library across all instances
  • Add server-side validation to strip or limit color-related attributes in HTML input
  • Enable request timeouts and resource limits on PDF generation processes
  • Monitor EPSS and library advisories for any change in exploit maturity

The record

TCPDF version <=6.6.5 is vulnerable to ReDoS (Regular Expression Denial of Service) if parsing an untrusted HTML page with a crafted color.

Affected packages

Ecosystem Package Introduced Fixed
Packagist tecnickcom/tcpdf 0 6.7.5
Debian:11 tcpdf 0 No fix
Debian:12 tcpdf 0 No fix
Debian:13 tcpdf 0 6.7.5+dfsg-1
Debian:14 tcpdf 0 6.7.5+dfsg-1
Mageia:9 php-tcpdf 0 6.5.0-1.1.mga9
Ubuntu:14.04:LTS tcpdf 0 No fix
Ubuntu:16.04:LTS tcpdf 0 No fix
Ubuntu:18.04:LTS tcpdf 0 No fix
Ubuntu:20.04:LTS tcpdf 0 No fix
Ubuntu:22.04:LTS tcpdf 0 No fix
Ubuntu:24.04:LTS tcpdf 0 No fix
Ubuntu:24.10 tcpdf 0 No fix
Ubuntu:25.04 tcpdf 0 No fix
Ubuntu:25.10 tcpdf 0 No fix
Ubuntu:Pro:14.04:LTS tcpdf 0 No fix
Ubuntu:Pro:16.04:LTS tcpdf 0 No fix
Ubuntu:Pro:18.04:LTS tcpdf 0 No fix
Ubuntu:Pro:20.04:LTS tcpdf 0 No fix

Related vulnerabilities