VYPR
Unrated severityNVD Advisory· Published Feb 17, 2021· Updated Aug 3, 2024

CVE-2021-27362

CVE-2021-27362

Description

The WPG plugin before 3.1.0.0 for IrfanView 4.57 has a Read Access Violation on Control Flow starting at WPG!ReadWPG_W+0x0000000000000133, which might allow remote attackers to execute arbitrary code.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Affected products

2
  • IrfanView/IrfanViewdescription
  • IrfanView/WPGllm-create
    Range: <3.1.0.0

Patches

Vulnerability mechanics

Root cause

"Missing bounds validation in WPG.DLL's pixel data write routine allows reading from unallocated or freed memory when processing a crafted WPG file."

Attack vector

An attacker crafts a malicious WPG file that triggers a read access violation when parsed by IrfanView's WPG.DLL plugin. The vulnerability is triggered when the user opens the crafted WPG file in IrfanView. The decompiled code shows that the write routine `sub_7C42E78` computes buffer offsets using attacker-controlled dimensions and bit-depth values without validating that the resulting offset stays within allocated memory, leading to a read from unallocated or freed memory [ref_id=1].

Affected code

The vulnerability resides in the WPG.DLL plugin (version before 3.1.0.0) for IrfanView 4.57. The crash occurs in the function `ReadWPG_W+0x133` (as referenced in the CVE description), which corresponds to the decompiled function `sub_7C42E78` that writes pixel data into a buffer. The caller function `sub_7C4326C` invokes this write routine in a loop without proper bounds checking [ref_id=1].

What the fix does

The advisory does not provide a patch diff. The vendor recommendation is to upgrade to the latest available version of the WPG plugin (3.1.0.0 or later) which patches the security issues [ref_id=1]. No specific fix details are published in the available reference materials.

Preconditions

  • inputUser must open a malicious WPG file in IrfanView
  • configIrfanView 4.57 with WPG plugin version before 3.1.0.0

Generated on May 25, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

2

News mentions

0

No linked articles in our index yet.