CVE-2024-22640
Research article
TCPDF HTML color handling flaw (CVE-2024-22640) allows resource-exhaustion denial of service
| CVE | CVE-2024-22640 |
|---|---|
| Published | December 04, 2026 00:50 UTC |
| Research cut-off | December 04, 2026 00:45 UTC |
| Sources reviewed | 4: NVD record (last modified 2026-06-17); CISA KEV catalog; vendor advisory page (ubuntu.com); FIRST EPSS (2026-12-03) |
Executive summary
CVE-2024-22640 is a flaw in how the TCPDF PDF generation library parses certain HTML color values, which can cause excessive resource consumption and denial of service through regular expression processing [1, 3]. NIST NVD scores it CVSS 3.1 7.5 HIGH with vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, from a Secondary scorer, and classifies it as CWE-1333 [1]. NVD lists TCPDF up to and including 6.7.4 and Fedora 40 as affected, and the Ubuntu bulletin lists Ubuntu 14.04, 16.04, 18.04, 20.04 and 22.04 LTS [1, 3]. Per the vector, no authentication or user interaction is required over the network, but the sources do not describe the application interface that would pass attacker input to TCPDF [1, 3]. The CVE is not in the CISA KEV catalog as of 2026-12-04, and its EPSS probability is 1.32%, a statistical estimate and not evidence of exploitation [2, 4]. Defenders should inventory TCPDF instances and their versions now, apply the vendor distribution updates, and cap PDF generation resources until the update is verified [1, 3].
Key points
- CVE-2024-22640 is a TCPDF flaw in parsing HTML color values that leads to resource exhaustion and denial of service [1, 3].
- NVD scores it CVSS 3.1 7.5 HIGH with vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H and CWE-1333 [1].
- Affected: TCPDF up to and including 6.7.4, Fedora 40, and Ubuntu 14.04, 16.04, 18.04, 20.04 and 22.04 LTS [1, 3].
- Not listed in CISA KEV as of 2026-12-04; EPSS is 1.32%, a statistical estimate and not exploitation evidence [2, 4].
- The fixed version is not stated in the pack; apply the Ubuntu and Fedora package updates and confirm the upstream release notes [1, 3].
Vulnerability identification
| Field | Detail |
|---|---|
| CVE ID | CVE-2024-22640 [1] |
| Vendor and product | TCPDF project, product TCPDF [1] |
| Component | Handling of HTML color values in TCPDF [3] |
| Affected platforms named | Upstream TCPDF, Fedora 40, Ubuntu 14.04, 16.04, 18.04, 20.04 and 22.04 LTS [1, 3] |
| Published | 2024-04-19T16:15:09 [1] |
| Last modified | 2026-06-17T07:11:38 [1] |
| Record status | Modified [1] |
| CWE | CWE-1333, Inefficient Regular Expression Complexity [1] |
| CVSS 3.1 base score | 7.5 HIGH [1] |
| CVSS 3.1 vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H [1] |
| Scorer | Secondary scorer, identified in NVD by a UUID; the pack contains no other scorer [1] |
| Related references | Ubuntu bulletin [3]; Fedora package announcement, a Debian LTS announcement and a third-party GitHub repository tagged Exploit in the NVD record [1] |
CWE-1333 describes a weakness in which a regular expression requires disproportionate processing for crafted input, so that the matching cost grows far faster than the input size. This pattern is commonly called regular expression denial of service [S1, Analyst assessment].
Vulnerability description
TCPDF is a PDF generation library, and the flaw lies in how it parses specific HTML color inputs [1, 3]. Incorrect parsing of these values lets an attacker trigger excessive resource consumption, which the vendor bulletin links to a denial-of-service outcome through regular expression processing [3]. The security property violated is availability. NVD scores the confidentiality and integrity impacts as none and the availability impact as high [1].
The flaw matters when TCPDF processes attacker-influenced HTML that contains crafted color values [S3, Analyst assessment]. The sources do not name the TCPDF function or the application interface involved. The sources describe no code execution, data disclosure or data modification resulting from this flaw [1, 3].
Attack surface and exploitation prerequisites
| Factor | Detail | Source |
|---|---|---|
| Access vector | Network [1] | S1 |
| Attack complexity | Low [1] | S1 |
| Privileges required | None, per the vector [1] | S1 |
| User interaction | None, per the vector [1] | S1 |
| Scope | Unchanged [1] | S1 |
| Required input | HTML containing crafted color values reaches TCPDF [S3, Analyst assessment] | S3 |
| Required configuration | Unknown; the sources do not describe a configuration option that enables or disables the flaw [1, 3] | S1, S3 |
The vector indicates that no privileges are needed, but it does not show whether a given application accepts untrusted HTML at all. Exposure therefore depends on the application design, not only on the installed TCPDF version.
Impact analysis
| Area | Technically demonstrated impact | Source |
|---|---|---|
| Confidentiality | None, per the CVSS vector [1] | S1 |
| Integrity | None, per the CVSS vector [1] | S1 |
| Availability | High, through excessive resource consumption and denial of service [1, 3] | S1, S3 |
| Authentication and authorization | No privileges required per the vector; no authorization boundary crossed, since scope is unchanged [1] | S1 |
| Data and privacy | None described in the sources [1, 3] | S1, S3 |
| Business operations | Plausible: interruption of any service that generates PDFs from affected input [Analyst assessment] | Analyst assessment |
| Regulatory or contractual | Not described in the pack | none |
Affected products and versions
| Vendor | Product or component | Affected versions | Platform | Fixed version | Source |
|---|---|---|---|---|---|
| TCPDF project | TCPDF | Up to and including 6.7.4 | Upstream library | Not stated in the pack | S1 |
| Fedora | fedora | 40 | Distribution package | Not stated in the pack | S1 |
| Canonical Ubuntu | TCPDF package | 14.04, 16.04, 18.04, 20.04, 22.04 LTS | Distribution package | Stated only as the latest package version; no number given | S3 |
The NVD range is expressed in upstream versions, while the Ubuntu bulletin is expressed in distribution releases [1, 3]. The Ubuntu bulletin states that other Ubuntu releases are not affected [3]. The fixed version is not stated in the reviewed sources, so no permanent fixed version can be named from the pack alone.
Exploitation and threat intelligence status
| Item | Status | Source and date |
|---|---|---|
| Confirmed exploitation in the wild | Unknown; the reviewed sources do not establish any exploitation activity for this CVE | S1, S2, S3 |
| CISA KEV catalog | Not listed as of 2026-12-04; absence from the catalog is not evidence of non-exploitation | S2, 2026-12-04 |
| EPSS | 0.0132 (1.32%) probability of exploitation activity in the next 30 days; percentile 0.7191; a statistical estimate, not exploitation evidence | S4, 2026-12-03 |
| Public exploit reference | NVD tags a third-party GitHub repository as Exploit; the pack does not contain its contents, so its functionality is unverified | S1 |
| Threat actors and campaigns | None attributed in the pack | none |
A public reference tagged as an exploit shows that code is published, not that it has been used against systems [S1, Analyst assessment].
Detection and exposure assessment
- Inventory: search application dependency manifests and server images for TCPDF, and record each installed version and host, using the package manager or dependency tooling of each platform [Analyst assessment].
- Upstream range: flag every TCPDF copy at version 6.7.4 or lower as within the NVD affected range [1].
- Ubuntu: on each host running the 14.04, 16.04, 18.04, 20.04 or 22.04 LTS releases named in the bulletin, query the installed TCPDF package version with the system package manager, then compare it with the package version in the Ubuntu security notice referenced by S3 [3].
- Fedora 40: query the installed TCPDF package version with the package manager and compare it with the Fedora package announcement referenced in S1 [1].
- Backports: distributions can fix a flaw in a package whose upstream version string has not changed, so distribution hosts must be judged by the distribution's advisory, not by the upstream version number alone [Analyst assessment].
- Application review: identify every code path that passes user-supplied HTML to TCPDF, because the version check shows presence of the library, not exploitability [Analyst assessment].
- Monitoring: record PDF generation duration and worker CPU time per endpoint, and alert when one request consumes a disproportionate share of a worker's CPU time [Analyst assessment]. The pack provides no log events or indicators for this flaw, so this baseline is the only available signal.
Remediation
Immediate mitigations, reducing exposure before the update is verified:
| Measure | Protects against | Limitation and side effect | Verification | Source or basis |
|---|---|---|---|---|
| Accept only a strict server-side format for HTML color values before they reach TCPDF, and reject other values | Crafted color inputs that trigger the described parsing behaviour [3] | May reject legitimate color formats; the accepted format must be tested against application needs | Unit tests of the validator with benign color values | Analyst assessment, following from the trigger described in S3 |
| Set request timeouts and CPU or memory limits on PDF generation workers | Resource exhaustion and denial of service [1, 3] | Long legitimate documents may fail | Review of worker configuration and timeout values | Analyst assessment |
| Restrict PDF generation endpoints to authenticated or internal callers | Untrusted network callers reaching the flawed code path [1] | May break public features | Test from an untrusted network location that the endpoint refuses access | Analyst assessment |
Permanent remediation:
- Ubuntu: apply the latest TCPDF package update from Ubuntu, as recommended by the bulletin [3]. Verify the installed package version against the notice. The pack does not state whether a restart is needed.
- Fedora 40: update the TCPDF package through the Fedora package manager, as in the announcement referenced by S1, and verify the installed version [1].
- Upstream TCPDF: move to a release later than 6.7.4, the upper bound in the NVD range [1]. The first fixed upstream release is not stated in the pack; confirm it in the project's release notes before deployment [Analyst assessment].
Vendor-confirmed fixes are the distribution updates in S3 and the Fedora announcement referenced in S1. Validator and timeout changes are recommended hardening, not vendor fixes.
Remediation checklist
- Inventory every TCPDF installation across hosts, containers and application dependency manifests, recording the version and platform [1].
- On Ubuntu 14.04, 16.04, 18.04, 20.04 or 22.04 LTS hosts, apply the latest TCPDF package update and verify the installed package version against the Ubuntu notice referenced by S3 [3].
- On Fedora 40 hosts, update the TCPDF package with the package manager and verify the installed version against the Fedora announcement referenced in S1 [1].
- For upstream TCPDF at 6.7.4 or lower, upgrade to a release later than 6.7.4; confirm the first fixed release in the project's release notes, which the pack does not provide [1].
- Add server-side validation so that only a strict color format reaches TCPDF; test the validator with benign color values to confirm rejection of other formats [S3, Analyst assessment].
- Set request timeouts and CPU or memory limits on PDF generation workers, then confirm the limits in the worker configuration [S1, Analyst assessment].
- Restrict PDF generation endpoints to authenticated or internal callers, then test from an untrusted network location that the endpoints refuse access [S1, Analyst assessment].
- Verify distribution hosts using the distribution advisory, not the upstream version string, because backported fixes may keep the upstream number [Analyst assessment].
- Monitor PDF generation duration and worker CPU time per endpoint, and investigate requests that consume a disproportionate share of CPU [Analyst assessment]. The pack provides no indicators to match.
- If unusually long PDF generation times or worker exhaustion are observed, collect application logs for the affected endpoints and compare them with the baseline before concluding a cause [Analyst assessment].
Evidence gaps
- Root cause: the pack does not describe the specific code path, function or regular expression responsible; this would be settled by the upstream TCPDF commit or the vendor advisory text.
- Upstream fixed version: the pack gives only the NVD upper bound 6.7.4; the first fixed TCPDF release needs the project's release notes or the NVD record's version data.
- Fixed package versions for Ubuntu and Fedora: the Ubuntu bulletin says to update to the latest package version, and the Fedora announcement contents are not in the pack; the distribution notice or package changelog would settle this.
- Official NVD description text: the pack paraphrases the flaw from the Ubuntu bulletin only; the NVD record's own description, and any revision history explaining the 2026 modification, are not in the pack.
- Exploit reference content: the GitHub repository tagged Exploit in the NVD record is not in the pack, so its functionality and whether it works against current versions are unverified.
- In-the-wild exploitation: no source documents exploitation activity, actors or campaigns; threat reporting or telemetry from incident responders would be needed.
- Indicators of compromise: the pack contains none; logs or telemetry from confirmed affected systems would be needed to define them.
- Application exposure: the pack does not identify which applications pass untrusted HTML to TCPDF or which interfaces accept it; a code review of TCPDF call sites would settle this.
- Other CVSS scores: only one Secondary CVSS 3.1 score is in the pack; a CNA or vendor score, if published, would need to be checked.
- Ubuntu bulletin date and any backport details: the bulletin's date is not stated in the pack, and the fixed package versions per release are not given.
- Debian LTS coverage: a Debian LTS announcement is referenced in the NVD record, but its contents are not in the pack; the Debian security tracker would settle whether Debian packages are affected and fixed.
References
- CVE-2024-22640 record. NIST National Vulnerability Database (NVD), 2026-06-17. https://nvd.nist.gov/vuln/detail/CVE-2024-22640. Accessed 2026-12-04.
- Known Exploited Vulnerabilities Catalog. Cybersecurity and Infrastructure Security Agency (CISA), 2026-12-04. https://www.cisa.gov/known-exploited-vulnerabilities-catalog. Accessed 2026-12-04.
- Vendor bulletin page (ubuntu.com). ubuntu.com. https://ubuntu.com/security/notices/USN-9522-1. Accessed 2026-12-04.
- EPSS score for CVE-2024-22640. FIRST, 2026-12-03. https://api.first.org/data/v1/epss?cve=CVE-2024-22640. Accessed 2026-12-04.
Summary
It was discovered that TCPDF incorrectly handled parsing certain HTML colors. An attacker could possibly use this issue to cause TCPDF to consume resources, resulting in a regular expression denial of service. This issue only affected Ubuntu 14.04 LTS, Ubuntu 16.04 LTS, Ubuntu 18.04 LTS, Ubuntu 20.04 LTS, and Ubuntu 22.04 LTS. (CVE-2024-22640) It was discovered that TCPDF incorrectly handled pars…
Severity breakdown
High · 7.5
An attacker without an account can exploit this over the network, without any user action.
- Attack from
- the network (remotely)
- Attack complexity
- low (no special conditions)
- Login needed
- no
- User action needed
- no
- Scope
- stays within the vulnerable component
- Impact
- high on availability, none on confidentiality and integrity
Weakness
- CWE-1333: Inefficient Regular Expression Complexity
Affected and fixed versions
| Product | Affected versions | Fixed in |
|---|---|---|
| tcpdf project tcpdf | ≤ 6.7.4 | — |
| fedoraproject fedora | 40 | — |
Public exploits
Exploit available
References by type
Other references
Frequently asked questions
What is CVE-2024-22640?
CVE-2024-22640 is a flaw in how the TCPDF PDF generation library parses certain HTML color values, which can cause excessive resource consumption and denial of service through regular expression processing. NIST NVD scores it CVSS 3.1 7.5 HIGH with vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, from a Secondary scorer, and classifies it as CWE-1333. Weakness type: Inefficient Regular Expression Complexity (CWE-1333).
How severe is CVE-2024-22640?
CVE-2024-22640 has a CVSS 3.1 base score of 7.5 (high), from CISA (ADP). An attacker without an account can exploit this over the network, without any user action.
Is CVE-2024-22640 being exploited?
Not as far as is known: CVE-2024-22640 is not in CISA's Known Exploited Vulnerabilities catalog as of December 4, 2026. Exploit code or a proof of concept has been published, which makes attacks more likely. EPSS estimates a 1.3% chance that it is exploited in the next 30 days.
Which versions are affected by CVE-2024-22640?
tcpdf project tcpdf ≤ 6.7.4; fedoraproject fedora 40.
How do I fix CVE-2024-22640?
Inventory every TCPDF installation across hosts, containers and application dependency manifests, recording the version and platform. On Ubuntu 14.04, 16.04, 18.04, 20.04 or 22.04 LTS hosts, apply the latest TCPDF package update and verify the installed package version against the Ubuntu notice referenced by S3. On Fedora 40 hosts, update the TCPDF package with the package manager and verify the installed version against the Fedora announcement referenced in S1.
Timeline & sources
References
Related vulnerabilities & news
- Ubuntu Addresses Scilab Security Flaws with Latest Update
- Ubuntu Urges Update for Smb4K Vulnerabilities in 16.04 LTS
- Ubuntu Notice USN-9523-1 Fixes Bootstrap XSS Flaws in libjs-bootstrap Packages
- Ubuntu Issues Security Patch for Oj Library Vulnerabilities
- Ubuntu Recommends System Updates for Orthanc Security Issues