/

CVE-2026-50003

Severity:

CRITICAL RISK

(9.8)

Path Traversal (CWE-22) in DCMTK C-GET Storage Mode

CVE-2026-50003

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Write Outside Intended Directory

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A path traversal vulnerability in DCMTK clients using bit-preserving C-GET storage mode allows a malicious or compromised server to cause file writes outside the intended output directory.

By supplying crafted relative or absolute paths, an attacker can redirect stored files to arbitrary locations on the client system, becoming risky wherever server-controlled filenames are not strictly validated.

Affected context

This issue occurs in DCMTK-based DICOM clients that:

  • Use the bit-preserving C-GET storage mode to receive files from DICOM servers
  • Accept server-provided file names or paths when writing received objects
  • Do not normalize or constrain target paths to a designated output directory

In such deployments, any server the client connects to can influence where files are written if path handling is not defensive.

Exploit preconditions

  • Attack surface: Network-facing DICOM C-GET interaction between client and server
  • Required access: Ability to act as, control, or compromise the DICOM server that the DCMTK client connects to
  • Trigger point: Server responses during bit-preserving C-GET operations that embed relative (../) or absolute file paths
  • Why exploitation is possible: The client trusts server-supplied paths and writes files directly without enforcing confinement to the chosen output directory, enabling traversal to arbitrary locations.

Why this happens

The vulnerability stems from insufficient validation and normalization of file paths derived from external input in the DCMTK C-GET storage workflow.

When a client accepts paths containing directory traversal sequences or absolute paths from a server and uses them directly for file creation, it violates the expectation that all output is constrained to a specific directory.

This maps to CWE-22: Path Traversal, where untrusted path components are used in filesystem operations without enforcing a safe root or rejecting traversal patterns.

Potential impact

  • Files may be written outside the intended output directory on the client system
  • Attackers could overwrite or replace existing files that are writable by the client
  • Configuration or log files can be tampered with, potentially altering application behavior
  • Sensitive locations may be populated with malicious data, aiding persistence or further compromise
  • Regulatory or privacy violations may occur if medical imaging data is stored in unintended, less protected locations

General mitigation guidance

Effective mitigation focuses on constraining filesystem operations to trusted directories and rejecting unsafe paths before writing.

Useful patterns include:

  • Normalizing and resolving server-provided paths against a fixed root, then verifying they remain within the designated output directory
  • Ignoring or sanitizing any directory components from server input and using locally generated file names instead
  • Implementing an allowlist of permitted characters and patterns for file names, excluding traversal sequences or absolute paths
  • Running DICOM clients with least-privilege filesystem permissions so that even misdirected writes have limited impact
  • Treating all server-controlled metadata, including file paths, as untrusted and validating it at the boundary of the storage subsystem

How teams detect issues like this

Detection commonly relies on a combination of code and runtime analysis:

  • Static analysis rules that flag use of untrusted input in file path construction or file system APIs without prior normalization or confinement checks
  • Code review practices that examine how DICOM C-GET responses are transformed into local file paths, looking for direct use of remote-provided strings
  • Logging and monitoring of unexpected file creations outside designated storage directories, coupled with alerts on suspicious path patterns (e.g., ../ segments)
  • Security testing and fuzzing of DICOM interactions to observe whether crafted paths can escape the intended output directory

Automated review tools and CI policies can help enforce path-handling guidelines across client implementations.

Sources

SourceLink
github.comgithub.com/DCMTK/dcmtk/releases/tag/latest
github.comgithub.com/cisagov/CSAF/blob/develop/csaf_files/OT/white/2026/icsma-26-181-01.json
cisa.govcisa.gov/news-events/ics-medical-advisories/icsma-26-181-01

Frequently asked

questions

It is exploitable whenever a DCMTK client uses bit-preserving C-GET mode and connects to a server that an attacker controls or has compromised, allowing the attacker to influence stored file paths.

The attacker needs the ability to behave as the DICOM server the client talks to or to manipulate that server's responses. No direct access to the client's filesystem is required beyond what the client process itself can write.

Constrain all file writes to a predefined output directory by normalizing paths, rejecting traversal and absolute paths, and preferably generating local file names independent of server input.

Adopt strict path-handling policies: treat remote paths as untrusted, validate and normalize them, enforce directory confinement, apply least-privilege file permissions, and incorporate these checks into code review and automated security testing.

Find out what's already
exploitable in your codebase.