CVE-2023-34295
Executive Summary
CVE-2023-34295 is a critical out-of-bounds write vulnerability in Sante DICOM Viewer Pro, a medical imaging application used for viewing DICOM files. The flaw resides in the parsing of DCM files, where insufficient validation of user-supplied data allows an attacker to write past the end of an allocated object. Exploitation requires user interaction (e.g., opening a malicious DCM file or visiting a crafted page), and successful exploitation leads to remote code execution in the context of the current process. With a CVSS score of 7.8 (High), this vulnerability poses significant risk to healthcare environments where DICOM viewers are widely deployed. No public exploit or patch is currently available, making detection and mitigation critical.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
CVSS Breakdown & Threat Level
- CVSS Score: 7.8 (High)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Attack Vector: Network (AV:N) – exploitation can be initiated remotely.
- Attack Complexity: Low (AC:L) – no special conditions required.
- Privileges Required: None (PR:N) – attacker does not need prior access.
- User Interaction: Required (UI:R) – victim must open a malicious file or page.
- Scope: Unchanged (S:U) – vulnerability does not affect other components.
- Confidentiality Impact: High (C:H) – arbitrary code execution can exfiltrate data.
- Integrity Impact: High (I:H) – attacker can modify system state.
- Availability Impact: High (A:H) – code execution can disrupt operations.
Threat Level: High. The vulnerability is remotely exploitable with low complexity, and while user interaction is required, the potential for full system compromise in medical environments elevates the risk.
Deep Dive & Mechanics
The vulnerability is a classic out-of-bounds write (CWE-787) occurring during the parsing of DICOM (DCM) files. DICOM files contain structured medical imaging data with tags and pixel data. The Sante DICOM Viewer Pro fails to properly validate the size of user-supplied data when processing these files, leading to a write operation that exceeds the bounds of an allocated buffer.
Technical Details:
- Root Cause: Lack of bounds checking when copying or processing data from a DCM file into a fixed-size buffer.
- Trigger: A specially crafted DCM file with oversized or malformed fields (e.g., pixel data length, tag values) causes the viewer to write beyond the allocated memory region.
- Impact: Overwriting adjacent memory can corrupt critical data structures, leading to arbitrary code execution. The attacker can hijack the control flow of the application.
- Context: The vulnerability is in the context of the current process, meaning the attacker gains the same privileges as the user running the viewer.
Attack Vector: An attacker hosts a malicious DCM file on a website or sends it via email. The victim must open the file with Sante DICOM Viewer Pro. No additional privileges are needed.
Vulnerable vs. Patched Code
No official patch is available. The vulnerable code likely resides in the DCM parsing module, where data is read without proper length validation. A patched version would include checks such as:
// Vulnerable code (pseudo)
void parse_dcm_field(char *buffer, size_t field_length) {
char local_buf[256];
memcpy(local_buf, buffer, field_length); // No bounds check
}
// Patched code (pseudo)
void parse_dcm_field(char *buffer, size_t field_length) {
char local_buf[256];
if (field_length > sizeof(local_buf)) {
// Handle error or truncate
return;
}
memcpy(local_buf, buffer, field_length);
}
Without a vendor patch, users must rely on mitigations like input validation or sandboxing.
Exploitation & Lab Setup
Red Team (Offensive)
Lab Setup:
- Target: Windows 10/11 with Sante DICOM Viewer Pro (any version).
- Attacker: Kali Linux with Python3 and Metasploit.
- Tools: Custom Python script to craft malicious DCM file, or use a fuzzer like boofuzz.
Exploitation Steps:
- Craft Malicious DCM File: Create a DICOM file with an oversized pixel data element (tag 0x7FE0,0010). Set the length field to a value larger than the actual data, causing an out-of-bounds write.
- Deliver File: Host on a web server or send via email.
- Trigger: Victim opens the file in Sante DICOM Viewer Pro.
- Code Execution: The overflow overwrites a function pointer or return address, redirecting execution to attacker-controlled shellcode.
Example Python Script (Conceptual):
import struct
def craft_malicious_dcm():
# DICOM preamble + header
dcm = b'\x00' * 128 + b'DICM'
# Malicious pixel data element (tag 0x7FE0,0010)
tag = struct.pack('<HH', 0x7FE0, 0x0010)
# Oversized length to trigger overflow
length = struct.pack('<I', 0xFFFFFFFF)
# Payload (shellcode or junk)
payload = b'A' * 1000
dcm += tag + length + payload
with open('malicious.dcm', 'wb') as f:
f.write(dcm)
craft_malicious_dcm()
Note: No public exploit code exists; this is a conceptual example.
Blue Team (Defensive)
Detection:
- Monitor for unusual DCM files with abnormal tag lengths (e.g., pixel data length > 10MB).
- Use endpoint detection rules to flag Sante DICOM Viewer Pro crashes or memory access violations.
Mitigation:
- Restrict execution of Sante DICOM Viewer Pro to sandboxed environments.
- Use application whitelisting to prevent untrusted DCM files from being opened.
- Implement network segmentation to limit exposure.
Indicators of Compromise (IOCs)
- File Hashes (Malicious DCM): Unknown (no public samples).
- Network Indicators: Connections to attacker-controlled IPs after exploitation.
- Process Behavior: Sante DICOM Viewer Pro crashes or exhibits abnormal memory usage.
- Registry/File System: Creation of suspicious files in temp directories (e.g., shellcode).
- YARA Rule (see Detection Engineering): Detects oversized DCM pixel data.
Detection Engineering
YARA Rule
rule CVE_2023_34295_DCM_Overflow {
meta:
description = "Detects malicious DCM files with oversized pixel data length"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2023-34295"
strings:
$dcm_header = "DICM"
$pixel_tag = { E0 7F 10 00 } // Little-endian tag 0x7FE0,0010
$large_length = { FF FF FF FF } // 4-byte length > 0x7FFFFFFF
condition:
$dcm_header at 128 and $pixel_tag and $large_length
}
Sigma Rule
title: Sante DICOM Viewer Pro Out-of-Bounds Write Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects potential exploitation of CVE-2023-34295 via abnormal DCM file parsing
author: Valters IT
date: 2025-04-10
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith: 'SanteDicomViewerPro.exe'
CommandLine|contains: '.dcm'
condition: selection
falsepositives:
- Legitimate large DICOM files (rare)
level: high
Suricata Rule
alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"CVE-2023-34295 Sante DICOM Viewer Pro DCM File Overflow"; flow:to_client,established; file_store; content:"DICM"; offset:128; depth:4; content:"|E0 7F 10 00|"; distance:0; within:4; content:"|FF FF FF FF|"; distance:0; within:4; classtype:attempted-user; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Disable or restrict use of Sante DICOM Viewer Pro until a patch is available.
- Workaround: Use alternative DICOM viewers (e.g., RadiAnt, MicroDicom) that are not affected.
- Network: Block inbound/outbound connections to untrusted sources for the application.
- User Training: Educate users not to open DCM files from untrusted sources.
- Monitoring: Deploy YARA/Sigma rules to detect malicious DCM files and exploitation attempts.
- Vendor Contact: Monitor Sante’s website for updates; consider reaching out for patch status.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.