☠️
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-7313

CVE-2025-7313 Remote Code Execution in Irfanview
📅 PUBLISHED: 2025-07-21 20:02 UTC 🔄 UPDATED: 2026-08-12 09:01 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-7313 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, as the victim must open a malicious DWG file or visit a malicious page. The vulnerability has a CVSS score of 7.8 (High) and is currently unpatched, with no public exploit code or proof-of-concept available. The EPSS score is 0.0%, indicating low exploitation likelihood at this time, but the risk remains significant due to the potential for arbitrary code execution.

⚡ 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 the IrfanView CADImage Plugin, a third-party plugin for the IrfanView image viewer. The plugin is distributed separately and may be bundled with IrfanView installations. Users should verify the integrity of their plugin files and ensure they are obtained from official sources.

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 (AV:L) – The attacker must deliver a malicious file to the target system.
  • Attack Complexity: Low (AC:L) – No special conditions are required.
  • Privileges Required: None (PR:N) – No authentication needed.
  • User Interaction: Required (UI:R) – The victim must open the malicious file.
  • Scope: Unchanged (S:U) – The vulnerability does not affect other components.
  • Confidentiality Impact: High (C:H) – Full data disclosure possible.
  • Integrity Impact: High (I:H) – Arbitrary code execution.
  • Availability Impact: High (A:H) – System crash or compromise.

Threat Level: High. Although no public exploit exists, the vulnerability allows full system compromise with minimal user interaction.

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 attempts to parse these files to display previews or thumbnails. The specific flaw is a memory corruption caused by improper validation of user-supplied data within the DWG file structure.

Root Cause: The parser does not properly check the size or boundaries of data fields when reading DWG file sections. An attacker can craft a DWG file with malformed records, such as oversized length fields or invalid pointers, leading to a buffer overflow or use-after-free condition.

Exploitation Path:

  1. The attacker creates a malicious DWG file with specially crafted data.
  2. The victim opens the file in IrfanView with the CADImage Plugin enabled.
  3. The plugin parses the DWG file, triggering the memory corruption.
  4. The attacker gains control of the instruction pointer and executes arbitrary shellcode.

Impact: Successful exploitation allows the attacker to execute arbitrary code in the context of the IrfanView process, potentially leading to full system compromise.

Vulnerable vs. Patched Code

Since no patch is available, a direct code comparison is not possible. However, based on the vulnerability description, the following pseudo-code illustrates the vulnerable pattern:

Vulnerable Code (Conceptual):

void parse_dwg_record(unsigned char *data, int size) {
    int record_len = *(int*)data; // No bounds check
    char buffer[256];
    memcpy(buffer, data + 4, record_len); // Potential overflow
}

Patched Code (Hypothetical):

void parse_dwg_record(unsigned char *data, int size) {
    int record_len = *(int*)data;
    if (record_len > 256 || record_len < 0) {
        // Handle error
        return;
    }
    char buffer[256];
    memcpy(buffer, data + 4, record_len);
}

The fix would involve adding proper bounds checking and input validation before copying data.

Exploitation & Lab Setup

Red Team (Offensive)

Prerequisites:

  • IrfanView with CADImage Plugin installed (any version).
  • A Windows test environment.

Steps:

  1. Craft Malicious DWG File: Use a fuzzer or manual binary editing to create a DWG file with a malformed record. For example, set a record length field to a large value (e.g., 0xFFFFFFFF) to cause a buffer overflow.
  2. Deliver Payload: Embed shellcode (e.g., a reverse shell) in the DWG file. The shellcode should be placed in a predictable location relative to the overflow.
  3. Trigger Exploit: Send the file to the victim via email, download link, or other means. The victim must open the file in IrfanView.
  4. Gain Access: Upon successful exploitation, the shellcode executes, providing remote access.

Example Payload (Conceptual):

# Python script to generate a malicious DWG file
import struct

# Craft a DWG header and a malformed record
dwg_data = b'\x41\x43\x31\x30'  # DWG header
dwg_data += struct.pack('<I', 0xFFFFFFFF)  # Oversized length
dwg_data += b'\x90' * 1000  # NOP sled
dwg_data += b'\xcc' * 200  # Shellcode placeholder

with open('malicious.dwg', 'wb') as f:
    f.write(dwg_data)

Blue Team (Defensive)

Detection:

  • Monitor for unusual IrfanView crashes or memory errors.
  • Use endpoint detection and response (EDR) tools to detect anomalous process behavior.
  • Implement file integrity monitoring for DWG files.

Prevention:

  • Disable the CADImage Plugin if not needed.
  • Use application whitelisting to prevent IrfanView from executing untrusted code.
  • Educate users not to open DWG files from untrusted sources.

Hunting:

  • Search for DWG files with unusual sizes or structures.
  • Analyze crash dumps for signs of exploitation.

Indicators of Compromise (IOCs)

  • File Hashes: (None available, but monitor for suspicious DWG files)
  • Network Indicators: Outbound connections from IrfanView process (e.g., reverse shell traffic).
  • Process Indicators: IrfanView.exe spawning child processes (e.g., cmd.exe, powershell.exe).
  • Registry Changes: Unauthorized modifications to IrfanView plugin settings.
  • File System: Creation of new files in temporary directories or startup folders.

Detection Engineering

YARA Rule

rule CVE_2025_7313_DWG_Malicious {
    meta:
        description = "Detects malicious DWG files exploiting CVE-2025-7313"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "https://nvd.nist.gov/vuln/detail/CVE-2025-7313"
    strings:
        $dwg_header = "AC10" // DWG header
        $large_len = { FF FF FF FF } // Oversized length field
    condition:
        $dwg_header at 0 and $large_len
}

Sigma Rule

title: Suspicious IrfanView Process Behavior
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects potential exploitation of CVE-2025-7313 via IrfanView spawning child processes
author: Valters IT
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        ParentImage|endswith: '\IrfanView.exe'
        Image|endswith:
            - '\cmd.exe'
            - '\powershell.exe'
            - '\wscript.exe'
    condition: selection
falsepositives:
    - Legitimate use of IrfanView with command-line tools
level: high

Suricata Rule

alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-7313 Potential Reverse Shell from IrfanView"; flow:to_server; content:"|00 00 00 00|"; depth:4; offset:0; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable the CADImage Plugin: Remove or disable the plugin until a patch is available.
  2. User Education: Train users to avoid opening DWG files from untrusted sources.
  3. Network Controls: Block inbound/outbound connections from IrfanView if not required.

Long-term Fix:

  • Monitor vendor (Irfanview) for a security update. Apply the patch as soon as it is released.
  • Consider using alternative image viewers that do not rely on vulnerable plugins.

Workarounds:

  • Use a sandbox or virtual machine to open untrusted DWG files.
  • Implement application control policies to restrict IrfanView execution.

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.

IrfanView CADImage Plugin
IrfanView DWG

💣 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-7313/ · 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.