/

CVE-2026-56445

Severity:

CRITICAL RISK

(9.1)

Path Traversal (CWE-22) in qrscp DICOM C-STORE Handler

CVE-2026-56445

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Write via Path Traversal

Severity:

CRITICAL RISK

(9.1)

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

The qrscp application's DICOM C-STORE handler trusts attacker-supplied dataset values when constructing filesystem paths, allowing crafted input to control where files are written.

When qrscp processes malicious C-STORE requests without proper path sanitization, an attacker can cause file writes outside the intended storage directory, turning routine image ingestion into a critical filesystem compromise.

Affected context

This vulnerability manifests in deployments of the qrscp application that accept DICOM C-STORE requests and persist incoming datasets to disk.

The affected code path uses values taken directly from the DICOM instance (such as identifiers or filenames) when calling os.path.join() to build output paths.

In environments where qrscp runs with elevated or service-level privileges and no additional filesystem isolation, a malicious DICOM sender can influence these paths far beyond the intended storage directory.

Exploit preconditions

  • Attack surface: Network-exposed DICOM C-STORE endpoint of qrscp
  • Required access: Ability to send crafted DICOM datasets to the qrscp server (e.g., as a DICOM node or client)
  • Trigger point: Handling of a C-STORE operation where dataset fields are used directly in os.path.join() to form the destination path
  • Why exploitation is possible: User-controlled DICOM instance values are not normalized or constrained before being combined into filesystem paths, enabling directory traversal sequences and arbitrary write locations

Why this happens

The underlying flaw is a classic path traversal issue where untrusted input is used in filesystem path construction without validation or restriction, aligning with CWE-22: Improper Limitation of a Pathname to a Restricted Directory.

In qrscp, the C-STORE handler treats fields from attacker-supplied DICOM datasets as safe path components and passes them directly to os.path.join() without checks for traversal tokens, absolute paths, or disallowed characters.

This insecure pattern breaks the intended directory boundary for stored images and allows a remote actor to escape the storage root and target arbitrary locations on the host filesystem.

Potential impact

  • An attacker could write files to arbitrary paths accessible to the qrscp process.
  • Malicious file placement can lead to configuration tampering or log poisoning.
  • Under certain deployments, arbitrary file writes may enable code execution (e.g., writing scripts or binaries into executable directories).
  • Critical service disruption can occur by overwriting application or system files.

General mitigation guidance

Effective mitigation relies on strictly constraining how filesystem paths are derived from DICOM data and ensuring storage operates within a well-defined, restricted root.

Common defensive patterns include:

  • Normalizing and validating all path components derived from DICOM datasets against an allowlist of expected formats and characters.
  • Rejecting or sanitizing any input containing directory traversal tokens, absolute paths, or unexpected separators.
  • Resolving the final path and enforcing that it remains inside a configured storage root (e.g., by checking canonical paths).
  • Using per-service directories with least-privilege permissions so that qrscp can only write where necessary.
  • Avoiding direct mapping of user-controlled identifiers to filesystem names; instead, using generated identifiers or database-backed metadata.

How teams detect issues like this

Organizations can detect this class of issue by:

  • Applying static analysis rules that flag uses of os.path.join() or similar APIs with parameters derived from network or DICOM input without validation.
  • During code reviews, looking for direct usage of dataset fields when building paths and verifying the presence of canonicalization and boundary checks.
  • Enforcing secure coding standards that require path normalization, root directory enforcement, and rejection of traversal patterns for any file IO.
  • Using automated security testing or dynamic analysis to send crafted DICOM datasets containing traversal sequences and observing write locations.

Sources

SourceLink
github.comgithub.com/cisagov/CSAF/blob/develop/csaf_files/OT/white/2026/icsma-26-176-01.json
github.comgithub.com/pydicom/pynetdicom
cisa.govcisa.gov/news-events/ics-medical-advisories/icsma-26-176-01

Frequently asked

questions

Exploitability depends on how exposed the qrscp C-STORE endpoint is and what privileges the process holds; any actor capable of sending DICOM C-STORE requests can potentially abuse the path handling.

An attacker needs network access and the ability to initiate C-STORE operations to the qrscp server. No local shell or prior filesystem access is required, as the vulnerable handler writes files on behalf of the remote client.

The safest pattern is to decouple filesystem paths from raw DICOM input by validating and normalizing any dataset-derived components, enforcing that all resolved paths remain within a dedicated storage root, and using generated identifiers instead of direct user-controlled names.

Preventing similar issues involves adopting a consistent path-handling strategy: treat all external identifiers as untrusted, apply strict validation and canonicalization before path construction, enforce directory boundaries, and include checks for these patterns in static analysis and code review processes.

Find out what's already
exploitable in your codebase.