Heap-Based Buffer Overflow in GDCM Package: CVE-2024-22391
Summary
DEBIAN-CVE-2024-22391: A heap-based buffer overflow vulnerability exists in the LookupTable::SetLUT functionality of Mathieu Malaterre Grassroot DICOM 3.0.23. Affects gdcm versions < 3.0.24-1. Fixed in 3.0.24-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
GDCM (Grassroots DICOM) is an open-source library designed for handling DICOM (Digital Imaging and Communications in Medicine) files. It provides functionalities for reading, writing, and manipulating DICOM images and metadata. The library is widely used in medical imaging applications. However, it has been identified to have a heap-based buffer overflow vulnerability in version 3.0.23, which can lead to severe memory corruption issues when processing specially crafted files.
Vulnerability Detail
The vulnerability, identified as CVE-2024-22391, arises from a flaw in the LookupTable::SetLUT functionality of the GDCM library. An attacker can exploit this vulnerability by providing a specially crafted malformed DICOM file, which can trigger a heap-based buffer overflow. This can lead to memory corruption, potentially allowing the attacker to execute arbitrary code or crash the application. The affected versions are prior to 3.0.24.
How To Fix
Minimum fixed version
3.0.24-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade gdcm
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, avoid processing untrusted or unknown DICOM files until the package is updated. Additionally, implement file validation checks to ensure that only properly formatted files are processed.
Conclusion
The GDCM library has a critical vulnerability (CVE-2024-22391) that can lead to severe consequences if exploited. It is crucial to update to the latest version to protect against potential attacks. Users are encouraged to monitor their applications for vulnerabilities using tools like Vulert.
See every vulnerability recorded for gdcm →
FAQ
CVE-2024-22391 is a vulnerability in the GDCM library that allows for a heap-based buffer overflow, potentially leading to memory corruption and arbitrary code execution.
Versions of GDCM prior to 3.0.24 are affected by this vulnerability.
You can use Vulert, which monitors open-source vulnerabilities in your software. By utilizing the Vulert playground, you can check if your application is affected without any signup.
If immediate updates are not possible, avoid processing untrusted DICOM files and implement validation checks to mitigate risks.
More information can be found in the official CVE database and the Debian security advisories related to GDCM.
References
Related vulnerabilities
Recent vulnerabilities recorded for gdcm.