Critical Deserialization Vulnerability in TCPDF Package
Summary
CVE-2018-17057: An issue was discovered in TCPDF before 6.2.22. Attackers can trigger deserialization of arbitrary data via the phar:// wrapper. Affects tcpdf across 3 version ranges.
< 1cdd78d27697b3150bb44aaa7af1a81062a591a5
< 6.2.26+dfsg-1
< 1861e33fe05f653b67d070f7c106463e7a5c26ed
Fixed in 6.2.26+dfsg-1. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
TCPDF is a popular open-source PHP library used for generating PDF documents. It provides a wide range of features including support for various fonts, images, and barcodes, making it a versatile tool for developers. However, prior to version 6.2.22, TCPDF was susceptible to a critical vulnerability that allowed attackers to exploit deserialization issues, potentially compromising the integrity of applications using this library.
Vulnerability Detail
The vulnerability, identified as CVE-2018-17057, arises from the improper handling of data deserialization via the phar:// wrapper in TCPDF versions before 6.2.22. Attackers can exploit this flaw to trigger deserialization of arbitrary data, leading to severe consequences such as remote code execution or data manipulation. The vulnerability has a CVSS score of 9.8, indicating its critical nature and the high risk it poses to affected systems.
How To Fix
Minimum fixed version
6.2.26+dfsg-1
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
If immediate upgrading is not feasible, consider implementing input validation and sanitization to mitigate the risk of deserialization attacks. Additionally, avoid using the phar:// wrapper in your application until the upgrade is completed.
Conclusion
The TCPDF vulnerability CVE-2018-17057 poses a significant risk to applications that utilize this library. It is crucial for developers to upgrade to the latest version to mitigate potential threats. By following the recommended steps and utilizing tools like Vulert, developers can ensure their applications remain secure.
See every vulnerability recorded for tcpdf →
FAQ
CVE-2018-17057 is a critical vulnerability in TCPDF that allows attackers to exploit deserialization of arbitrary data via the phar:// wrapper.
TCPDF versions prior to 6.2.22 are affected by this vulnerability.
Exploitation of this vulnerability can lead to remote code execution, data manipulation, and compromise of application integrity.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.
Vulert is a tool that monitors and alerts in real-time for open-source vulnerabilities in software using just a manifest file like package-lock.json.
References
Related vulnerabilities
Recent vulnerabilities recorded for tcpdf.