Font Handling Vulnerability in TCPDF Package - CVE-2024-56520

tcpdf Updated 02 Oct 2025

Summary

27/12/2024
N/A
Yes i
Unrated
Not published

CVE-2024-56520: An issue was discovered in tc-lib-pdf-font before 2.6.4, as used in TCPDF before 6.8.0 and other products. Affects tcpdf across 3 version ranges.

< 6.3.5+dfsg1-1+deb11u1 < 30012e333ae611c514ec2dc7cb370bbf4da4e677 < a0a02efe487cc39bd5223359e916dbeafb5cd6fe

Fixed in 6.3.5+dfsg1-1+deb11u1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

TCPDF is a popular PHP library for generating PDF documents. It supports various features such as text, images, and graphics, making it a versatile tool for developers. However, it relies on external font libraries, which can introduce vulnerabilities if not properly managed. The vulnerability in question affects the handling of font data, specifically Type 1 and TrueType fonts, leading to potential misparsing issues.

Vulnerability Detail

CVE-2024-56520 is a vulnerability found in the tc-lib-pdf-font library, which is used by TCPDF. The issue arises from the mishandling of font data, particularly the FontBBox attribute for Type 1 and TrueType fonts. This misparsing can lead to incorrect rendering of PDF documents, potentially exposing sensitive information or causing application crashes. The vulnerability affects multiple versions of TCPDF and can be exploited if an attacker manipulates font data.

How To Fix

Minimum fixed version

6.3.5+dfsg1-1+deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade tcpdf

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can avoid using Type 1 and TrueType fonts in your PDF generation until the package is updated. Consider using alternative font formats that are not affected by this vulnerability.

Conclusion

CVE-2024-56520 highlights a significant vulnerability in the TCPDF package related to font handling. It is crucial for developers to update their TCPDF installations to the latest version to mitigate risks associated with this vulnerability. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for tcpdf →

Share this vulnerability

FAQ

CVE-2024-56520 is a vulnerability related to the mishandling of font data in the TCPDF library, which can lead to misparsed font attributes.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The risks include incorrect rendering of PDF documents, potential exposure of sensitive information, and application crashes.

Yes, a patch is available in TCPDF version 6.8.0+dfsg-1 and later. Updating to this version will resolve the vulnerability.

If you cannot update the package right away, consider using alternative font formats and monitor your application for any unusual behavior.

Related vulnerabilities

Recent vulnerabilities recorded for tcpdf.

How To Fix

Minimum fixed version

6.3.5+dfsg1-1+deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade tcpdf

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback