CVE-2025-7324
Executive Summary
CVE-2025-7324 is a critical out-of-bounds read vulnerability in the IrfanView CADImage Plugin when parsing DXF files. The flaw allows a remote attacker to execute arbitrary code in the context of the current process, requiring user interaction (opening a malicious DXF file or visiting a malicious page). With a CVSS score of 7.8, this vulnerability poses a significant risk to systems using IrfanView with the CADImage Plugin, especially in environments where users frequently handle CAD files. No public exploit or patch is currently available, but the risk is elevated due to the potential for weaponization.
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)
- Attack Vector: Local (AV:L) – requires user to open a file
- Attack Complexity: Low (AC:L) – no special conditions needed
- Privileges Required: None (PR:N)
- User Interaction: Required (UI:R) – victim must open the file
- Scope: Unchanged (S:U)
- Confidentiality Impact: High (C:H)
- Integrity Impact: High (I:H)
- Availability Impact: High (A:H)
Threat Level: High. The vulnerability is remotely exploitable via social engineering, and successful exploitation grants full code execution in the user's context.
Deep Dive & Mechanics
The vulnerability resides in the CADImage Plugin's DXF file parser. DXF (Drawing Exchange Format) files contain structured data representing CAD drawings. The plugin fails to properly validate user-supplied data when reading DXF records, leading to a read past the end of an allocated buffer. This out-of-bounds read can be leveraged by an attacker to corrupt memory and achieve arbitrary code execution.
Root Cause: Lack of bounds checking on DXF data fields, specifically when parsing entity or header sections. An attacker can craft a DXF file with malformed length fields or pointers, causing the parser to read beyond the intended buffer.
Attack Vector: The attacker delivers a malicious DXF file via email, download, or web page. When the victim opens the file with IrfanView (with the CADImage Plugin installed), the vulnerable code path is triggered.
Impact: Full compromise of the user's session, including access to files, credentials, and potential lateral movement if the user has elevated privileges.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is the current implementation of the DXF parser in the CADImage Plugin. A patched version would include proper bounds checking and input validation.
Vulnerable Code (Conceptual):
// Vulnerable: no bounds check on data length
void parse_dxf_record(char *buffer, int length) {
char *data = buffer + 8; // skip header
int data_len = *(int*)buffer; // attacker-controlled
// Out-of-bounds read if data_len > length
process_data(data, data_len);
}
Patched Code (Conceptual):
// Patched: validate data length against buffer size
void parse_dxf_record(char *buffer, int length) {
if (length < 12) return; // minimum size check
int data_len = *(int*)buffer;
if (data_len < 0 || data_len > length - 8) return; // bounds check
char *data = buffer + 8;
process_data(data, data_len);
}
Exploitation & Lab Setup
Red Team (Exploitation)
No public exploit code is available. However, a proof-of-concept can be developed by crafting a DXF file with an oversized length field in a record header. The following steps outline a potential approach:
- Craft a Malicious DXF File: Create a DXF file with a manipulated
LWDATAorENTITIESsection where a length field exceeds the actual data size. - Trigger the Vulnerability: Open the file in IrfanView with the CADImage Plugin.
- Achieve Code Execution: Use the out-of-bounds read to leak memory addresses or overwrite a function pointer, then redirect execution to shellcode.
Example DXF Payload Structure (Conceptual):
0
SECTION
2
ENTITIES
0
LINE
5
10
100
// Malformed length field
0
ENDSEC
0
EOF
Blue Team (Detection & Defense)
- User Awareness: Train users not to open DXF files from untrusted sources.
- Application Control: Restrict execution of IrfanView and the CADImage Plugin to trusted users only.
- Sandboxing: Run IrfanView in a sandboxed environment (e.g., Windows Sandbox, AppContainer).
- File Scanning: Use antivirus/EDR solutions to scan DXF files for anomalies.
- Network Filtering: Block DXF file downloads from untrusted domains.
Indicators of Compromise (IOCs)
- File Hashes (MD5/SHA1/SHA256): No known samples yet.
- Network Indicators: Connections to attacker-controlled IPs after exploitation.
- Process Anomalies: IrfanView.exe spawning child processes (e.g., cmd.exe, powershell.exe).
- Registry Changes: Modifications to
HKCU\Software\IrfanViewor plugin settings. - File System: Creation of malicious files in
%TEMP%or%APPDATA%.
Detection Engineering
YARA Rule
rule CVE_2025_7324_DXF_OOB_Read {
meta:
description = "Detects malicious DXF files exploiting CVE-2025-7324"
author = "Valters IT"
date = "2025-04-01"
reference = "CVE-2025-7324"
strings:
$dxf_header = "0\nSECTION\n2\nENTITIES\n0\nLINE"
$malformed_length = { 00 00 00 FF } // oversized length field
condition:
$dxf_header and $malformed_length
}
Sigma Rule
title: CVE-2025-7324 IrfanView CADImage Plugin DXF Exploitation
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects potential exploitation of CVE-2025-7324 via DXF file opening
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith: '\\IrfanView.exe'
CommandLine|contains: '.dxf'
condition: selection
falsepositives:
- Legitimate DXF file opening
level: high
Suricata Rule
alert tcp $HOME_NET any -> $EXTERNAL_NET $HTTP_PORTS (msg:"CVE-2025-7324 DXF File Download"; flow:to_server,established; content:"Content-Type|3a 20|application/dxf"; nocase; content:".dxf"; nocase; classtype:attempted-user; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Disable or uninstall the CADImage Plugin until a patch is released.
- Vendor Contact: Monitor IrfanView's official website for updates.
- Workaround: Use alternative CAD viewers that are actively maintained.
- User Training: Educate users on the risks of opening DXF files from untrusted sources.
- Network Segmentation: Limit exposure of systems running IrfanView.
Valters IT – Securing Digital Frontiers
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.