CVE-2025-7308
Executive Summary
CVE-2025-7308 is a critical memory corruption vulnerability in the IrfanView CADImage Plugin when parsing specially crafted DWG files. The flaw stems from improper validation of user-supplied data, leading to a memory corruption condition that can be leveraged for remote code execution (RCE) in the context of the current process. User interaction is required—the victim must open a malicious DWG file or visit 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 untrusted DWG files are processed. No public proof-of-concept (PoC) or exploit code is currently available, and no official patch has been released.
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
Supply Chain & Package Security
This vulnerability is not related to NPM, PyPI, Go, or Ruby packages. It affects a standalone Windows plugin for IrfanView, a third-party image viewer. The risk is limited to direct exploitation via malicious DWG files.
CVSS Breakdown & Threat Level
- CVSS Score: 7.8 (High)
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Attack Vector: Local (requires user to open a file)
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: Required
- Scope: Unchanged
- Confidentiality Impact: High
- Integrity Impact: High
- Availability Impact: High
Threat Level: High. Exploitation could lead to full system compromise, but requires user interaction. The lack of a patch and unknown exploit status increases risk.
Deep Dive & Mechanics
The vulnerability resides in the CADImage Plugin’s DWG file parser. DWG files are binary formats used by AutoCAD and other CAD software. The plugin fails to properly validate data lengths or offsets when parsing DWG file structures, leading to a memory corruption condition (likely a buffer overflow or use-after-free). An attacker can craft a malicious DWG file containing oversized or malformed fields that trigger the corruption when parsed by IrfanView. This corruption can overwrite critical memory regions, allowing the attacker to hijack execution flow and execute arbitrary code.
Root Cause: Lack of bounds checking on user-supplied data during DWG parsing. The plugin trusts the file’s internal size fields without verifying they fit within allocated buffers.
Attack Vector: Remote, via email, web download, or any method that delivers a malicious DWG file. The victim must open the file with IrfanView.
Impact: Full compromise of the user’s session, including access to files, credentials, and system resources.
Vulnerable vs. Patched Code
No official patch is available. The vulnerable code is in the CADImage Plugin’s DWG parsing routine. A hypothetical fix would involve adding input validation and bounds checking before memory operations.
Vulnerable Code (Conceptual):
void parse_dwg_field(char *buffer, int size) {
char *field = malloc(size);
memcpy(field, buffer, size); // No size validation
// Process field...
}
Patched Code (Conceptual):
void parse_dwg_field(char *buffer, int size, int max_size) {
if (size > max_size) {
// Handle error
return;
}
char *field = malloc(size);
memcpy(field, buffer, size);
// Process field...
}
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- IrfanView with CADImage Plugin installed (any version)
- A Windows test environment (VM recommended)
- Python 3.x with
structmodule for crafting DWG files
Steps:
- Craft a Malicious DWG File: Use a Python script to create a DWG file with an oversized field in the header or entity section.
- Deliver the File: Send via email or host on a web server.
- Trigger the Vulnerability: Open the file with IrfanView. The memory corruption should cause a crash or, with careful crafting, code execution.
Example Python Script (Conceptual):
import struct
def create_malicious_dwg():
# DWG header with oversized size field
header = b'\x41\x43\x31\x30' # Magic bytes
header += struct.pack('<I', 0xFFFFFFFF) # Corrupted size
# Add padding and shellcode (not provided)
with open('malicious.dwg', 'wb') as f:
f.write(header)
create_malicious_dwg()
Note: No public exploit code exists. This is a conceptual example.
Blue Team (Defensive)
Detection:
- Monitor for IrfanView crashes (Event ID 1000 in Windows Event Log)
- Use file integrity monitoring to detect unexpected DWG files
- Deploy YARA rules to scan for malicious DWG patterns
Prevention:
- Disable the CADImage Plugin if not needed
- Use application whitelisting to block IrfanView from executing untrusted files
- Implement email filtering for DWG attachments
Indicators of Compromise (IOCs)
- File Hashes: Unknown (no known samples)
- Network Indicators: None (local file execution)
- Behavioral:
- IrfanView process crash (Event ID 1000)
- Unexpected child processes spawned by IrfanView
- Memory corruption errors in application logs
- Registry: Modifications to IrfanView plugin settings
Detection Engineering
YARA Rule
rule CVE_2025_7308_DWG_Malicious {
meta:
description = "Detects malicious DWG files exploiting CVE-2025-7308"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2025-7308"
strings:
$magic = { 41 43 31 30 } // DWG magic bytes
$oversized = { FF FF FF FF } // Potential oversized field
condition:
$magic at 0 and $oversized in (0..1024)
}
Sigma Rule
title: IrfanView CADImage Plugin Crash
id: 7b8c9d0e-1f2a-3b4c-5d6e-7f8a9b0c1d2e
status: experimental
description: Detects IrfanView crashes potentially caused by CVE-2025-7308
logsource:
product: windows
service: application
detection:
selection:
EventID: 1000
Application: "IrfanView.exe"
FaultModule: "CADImage.dll"
condition: selection
falsepositives:
- Legitimate crashes due to other bugs
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-7308 - Malicious DWG File Download"; flow:to_client; file.name:"*.dwg"; content:"|41 43 31 30|"; offset:0; depth:4; content:"|FF FF FF FF|"; within:1024; classtype:attempted-user; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the CADImage Plugin in IrfanView (Options > PlugIns > Uncheck CADImage).
- Block DWG file execution via Group Policy or application control.
- Educate users not to open DWG files from untrusted sources.
Long-Term:
- Monitor vendor for official patch (currently UNKNOWN).
- Consider using alternative CAD viewers with active security support.
- Implement strict file upload validation on web applications.
Workaround: Convert DWG files to safer formats (e.g., PDF) before opening.
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.