CVE-2024-56521
NoneTCPDF missing certificate validation
CVSS
—
EPSS
0.8%
Published
Dec 27, 2024
CISA due date
—
Cloudanix analysis
A flaw in a popular PDF library can let attackers secretly intercept or change information the library downloads from the internet, putting document-based processes at risk until updated.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Library
- Class
- Cryptographic Weakness
- Remediation
- Upgrade
- Effort
- Low
- Patch risk
- Low
What it actually does
TCPDF prior to 6.8.0 configures libcurl with CURLOPT_SSL_VERIFYHOST and CURLOPT_SSL_VERIFYPEER disabled or set to unsafe values, disabling TLS certificate validation for any HTTP requests made via the library.
Why it matters to the business
Organizations using TCPDF for PDF generation that involve network fetches face risk of intercepted or altered content being processed without detection, potentially leading to supply-chain compromise or data exfiltration in document workflows.
How an attack unfolds
An attacker positioned on the network path intercepts TCPDF-initiated HTTPS requests, presents a forged certificate, and supplies malicious payloads or redirects because certificate checks are bypassed by the unsafe curl options.
How to fix it
Upgrade tecnickcom/tcpdf to the commit aab43ab0a824e956276141a28a24c7c0be20f554 (version 6.8.0 or later) so that CURLOPT_SSL_VERIFYHOST and CURLOPT_SSL_VERIFYPEER are configured safely when libcurl is used.
How to confirm the fix worked
Confirm the installed TCPDF version is 6.8.0 or newer; review source for proper curl option settings; test HTTPS fetches with intentionally invalid certificates to verify rejection.
Typical attack path
- Identify applications using TCPDF to fetch remote resources over HTTPS
- Position as network adversary capable of intercepting traffic to the target hostnames
- Present a crafted certificate during the TLS handshake
- Deliver altered or malicious content that TCPDF processes without validation
- Achieve code execution, data theft, or further compromise via the processed content
How to detect it
Review application and web-server logs for unexpected external connections initiated by the PHP process hosting TCPDF; inspect network traffic for TLS sessions with invalid or self-signed certificates accepted by the application; search process execution logs for curl or PHP requests to untrusted domains.
What your security team should do
- Immediately upgrade all instances of tecnickcom/tcpdf to the fixed commit
- Audit code paths that trigger remote fetches through TCPDF
- Enforce network-level TLS inspection or proxy rules that reject invalid certificates
- Monitor dependency scanners for any remaining older TCPDF versions
The record
An issue was discovered in TCPDF before 6.8.0. If libcurl is used, CURLOPT_SSL_VERIFYHOST and CURLOPT_SSL_VERIFYPEER are set unsafely.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Packagist | tecnickcom/tcpdf | 0 | 6.8.0 |
| Debian:11 | tcpdf | 0 | No fix |
| Debian:12 | tcpdf | 0 | No fix |
| Debian:13 | tcpdf | 0 | 6.8.0+dfsg-1 |
| Mageia:9 | php-tcpdf | 0 | 6.5.0-1.3.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: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-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-32489 TCPDF before 6.7.4 mishandles calls that use HTML syntax. 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