Heap-Based Buffer Overflow in GDCM Package: CVE-2024-22391

gdcm Updated 02 Oct 2025

Summary

25/04/2024
N/A
Yes i
Unrated
Not published

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 ↓

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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for gdcm.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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 →

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