CVE-2024-32489
NoneCVSS
—
EPSS
0.6%
Published
Apr 15, 2024
CISA due date
—
Cloudanix analysis
A PDF creation tool can be tricked into embedding harmful content inside documents when it receives specially crafted instructions.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Theoretical
- Impact
- Data Exposure
- Component
- Library
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Low
- Patch risk
- Low
What it actually does
The library fails to sanitize or properly validate HTML input before PDF rendering, allowing injection of arbitrary HTML tags and attributes that are processed during document generation.
Why it matters to the business
Organizations using the library to create PDFs from user-supplied content risk generation of documents containing unexpected or malicious elements, potentially leading to data leakage, phishing via PDFs, or downstream processing failures.
How an attack unfolds
An attacker supplies crafted HTML containing malicious tags to any application endpoint that invokes the vulnerable PDF generation function; the library renders the input without proper escaping, embedding the attacker-controlled content into the resulting PDF file.
How to fix it
Upgrade tecnickcom/tcpdf to commit 51cd1b39de5643836e62661d162c472d63167df7 or later release 6.7.4; review and replace any custom HTML sanitization logic with the fixed library version.
How to confirm the fix worked
After upgrade, retest PDF generation with known malicious HTML payloads to confirm injection is blocked; scan dependency manifests for the exact commit hash or version string below 6.7.4.
Typical attack path
- Identify an application endpoint that accepts HTML and passes it to TCPDF for PDF conversion.
- Craft HTML payload containing injection primitives such as script, iframe, or style tags.
- Submit the payload via the normal application workflow.
- Retrieve or observe the generated PDF to confirm injected content is present and functional.
How to detect it
Review application logs for unusual HTML fragments or unexpected tags in PDF generation requests; inspect generated PDF files for embedded scripts or external resource references that were not part of the original template.
What your security team should do
- Immediately inventory all applications using tecnickcom/tcpdf and prioritize upgrade to the fixed commit.
- Implement input validation and output escaping for any HTML passed to PDF generators as a defense-in-depth measure.
- Monitor dependency update channels for future TCPDF releases and automate vulnerability scanning of open-source components.
The record
TCPDF before 6.7.4 mishandles calls that use HTML syntax.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Packagist | tecnickcom/tcpdf | 0 | 6.7.4 |
| Debian:11 | tcpdf | 0 | No fix |
| Debian:12 | tcpdf | 0 | No fix |
| Debian:13 | tcpdf | 0 | 6.7.4+dfsg-1 |
| 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 | 6.7.5+dfsg-1 |
| Ubuntu:24.10 | tcpdf | 0 | 6.7.5+dfsg-1 |
| 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
- CVE-2024-56527 TCPDF missing character escape on error messages Also affects tecnickcom/tcpdf
- CVE-2024-56519 TCPDF lacks SVG sanitization Also affects tecnickcom/tcpdf
- CVE-2024-56521 TCPDF missing certificate validation Also affects tecnickcom/tcpdf
- CVE-2024-56522 TCPDF has incorrect comparison Also affects tecnickcom/tcpdf
- CVE-2024-51058 TCPDF Local File Inclusion vulnerability Also affects tecnickcom/tcpdf
- CVE-2024-22640 TCPDF version <=6.6.5 is vulnerable to ReDoS (Regular Expression Denial of Service) if… Also affects tecnickcom/tcpdf
- CVE-2024-56520 An issue was discovered in tc-lib-pdf-font before 2.6.4, as used in TCPDF before 6.8.0… Also affects tcpdf
- CVE-2024-22641 TCPDF version 6.6.5 and before is vulnerable to ReDoS (Regular Expression Denial of… Also affects tcpdf