Skip to main content
Mallory
CriticalPublic exploitVulnerability

CVE-2025-50165: Remote Code Execution in Windows Imaging Component JPEG Re-encoding

Published Aug 12, 2025 · Updated 25 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS9.8Critical · v3.1
EPSS14.7%97th percentile
CISA KEVNoNot listed
In the wildReported1 exploitation record in Mallory
Vendor
Microsoft Corporation
IdentifiersCVE-2025-50165CWE-822 · Untrusted Pointer Dereference

CVE-2025-50165 is an untrusted pointer dereference vulnerability in the Microsoft Windows Graphics Component's Windows Imaging Component (WIC). During compression or re-encoding of specially crafted 12-bit or 16-bit JPEG images, uninitialized compress_data_12 or compress_data_16 function pointers can be dereferenced, potentially enabling arbitrary code execution. The vulnerable path includes jpeg_finish_compress. Affected WIC library versions range from 10.0.26100.0 through 10.0.26100.4945, associated with Windows 11 24H2 and Windows Server 2025. Although initially described as a JPEG decoding vulnerability, detailed root-cause analysis identifies compression or re-encoding as the trigger; merely opening or viewing an image is insufficient. Microsoft assigned a CVSS 3.1 base score of 9.8.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation permits arbitrary code execution within the affected image-processing process, potentially compromising the confidentiality, integrity, and availability of resources accessible to that process. Exploitation does not inherently confer SYSTEM or administrator privileges. Despite the critical severity rating, practical exploitation requires substantial control over process memory and knowledge of relevant addresses.

Mitigation

If you can’t patch tonight, do this now.

Until patched, reduce exposure by preventing untrusted 12-bit and 16-bit JPEG images from reaching WIC compression or re-encoding workflows, including automatic thumbnail-generation and image-conversion functions. Validate image format and bit depth before submitting images to those workflows. These exposure-reduction measures are not substitutes for the security update; no specific vendor-approved workaround is established.

Remediation

Patch, then assume compromise.

Install Microsoft's August 2025 security updates addressing CVE-2025-50165, or superseding cumulative updates, on affected Windows systems. Prioritize systems and applications that re-encode untrusted images. The fix initializes the affected function pointers and checks for NULL before dereferencing them, aligning with corrections in libjpeg-turbo 3.1.1. Verify that the affected WIC library is no longer within the vulnerable version range of 10.0.26100.0 through 10.0.26100.4945.

Public exploits

Exploits

2 exploits validated by Mallory's analysis. Hidden: 4 rejected by Mallory's analysis as not a working exploit; 1 not yet analyzed, such as Exploit-DB entries.

View more in app →
CVE-2025-50165-x64-ExploitThis repository provides a working proof-of-concept exploit for CVE-2025-50165, a critical remote code execution vulnerability in the Windows Graphics Component (windowscodecs.dll) on Windows 11 24H2 (prior to patch KB5040442). The exploit is implemented as a single Python script (scripts/generate_poc.py) that generates a weaponized JPEG file (poc/CVE-2025-50165_x64_encrypter15.jpg). The JPEG embeds x64 shellcode (spawns calc.exe), a heap spray, a ROP chain, and a polymorphic NOP sled to evade AV/EDR detection. The exploit requires the target to open the malicious JPEG with a vulnerable application (such as Photos, Office, or Edge preview), after which code execution is achieved with no user interaction or privileges required. The repository is well-documented, with a README describing the vulnerability, usage instructions, and technical details. No external network endpoints are used; the attack vector is a crafted file delivered to the target.encrypter15 · Disclosed Dec 7, 2025 · python · networkOperationalCVE-2025-50165-Windows-Graphics-Component-RCESmall two-file repository containing a Python proof-of-concept generator and a detailed README for CVE-2025-50165, a Windows Imaging Component/WindowsCodecs.dll vulnerability. The main exploit logic is in poc_gen.py, which constructs a malformed JPEG beginning with standard JPEG markers, then appends multiple APP1/Exif segments used as a heap-spray vehicle. Each sprayed segment contains a randomized NOP sled, a hardcoded x64 ROP chain with placeholder gadget addresses, embedded shellcode, and marker values such as 0xdeadbeefdeadbeef. The script writes the resulting file to poc/CVE-2025-50165_x64.jpg using PIL/PIF Image.frombytes. The exploit is file-based rather than network-delivered: the generated JPEG must be opened or otherwise processed by a vulnerable WIC host application. The README explains that exploitation occurs not during ordinary decode/view in most cases, but when the host performs JPEG re-encode or thumbnail generation, reaching jpeg_finish_compress and dereferencing uninitialized compress_data_12/compress_data_16 pointers. The intended post-exploitation effect is calc.exe execution, though the code uses hardcoded ROP gadget addresses and appears tailored as a lab PoC rather than a broadly reliable exploit. No command-and-control, remote callback, or external network infrastructure is present in the code. The repository’s purpose is to generate a malicious image for patch validation and vulnerability research against vulnerable Windows 11 24H2 / Windows Server 2025 systems.FelineKeeper · Disclosed May 22, 2026 · python · markdown · file · local · webOperational
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Microsoft CorporationWindows 11 24h2operating_system
Microsoft CorporationWindows Server 2025operating_system
FAQ

Frequently asked questions

Is CVE-2025-50165 exploited in the wild?
Yes. As of Oct 28, 2026, Mallory has reports of exploitation in the wild.
Is there a public exploit for CVE-2025-50165?
Yes. Mallory tracks 2 public exploits or proofs of concept for CVE-2025-50165, the earliest disclosed Dec 7, 2025.
Is there a patch for CVE-2025-50165?
Install Microsoft's August 2025 security updates addressing CVE-2025-50165, or superseding cumulative updates, on affected Windows systems. Prioritize systems and applications that re-encode untrusted images.
What products are affected by CVE-2025-50165?
Microsoft Corporation Windows 11 24h2 and Microsoft Corporation Windows Server 2025.
How severe is CVE-2025-50165?
CVE-2025-50165 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 14.7% (97th percentile) as of Oct 28, 2026.
Activity feed

Recent activity

46 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
csirt skNews · Jan 5, 2026Microsoft v rámci augustového Patch Tuesday opravil viacero kritických a zero-day zraniteľnosť | CSIRT.SKA critical Windows Graphics remote code execution vulnerability caused by dereferencing an untrusted pointer during processing of specially crafted graphical content such as a malicious JPEG, potentially delivered in an Office document.Read more ↗cyber security newsNews · Dec 23, 2025Windows Imaging Component Vulnerability Can Lead to RCE Attacks Under Complex Attack ScenariosA critical remote code execution vulnerability in Windows Imaging Component (WIC) due to dereferencing an uninitialized function pointer during JPEG compression and re-encoding, specifically affecting 12-bit and 16-bit JPEG images.Read more ↗the hacker newsNews · Nov 24, 2025⚡ Weekly Recap: Fortinet Exploit, Chrome 0-Day, BadIIS Malware, Record DDoS, SaaS Breach & MoreA vulnerability in Windows Graphics. Details not specified in the content, but it is listed as a serious security flaw for the week.Read more ↗zscaler threat labzNews · Nov 20, 2025CVE-2025-50165: Windows Graphics Component Flaw | ThreatLabzAn untrusted pointer dereference in Windows imaging/JPEG encoding path (windowscodecs.dll, involving jpeg_finish_compress / CJpegTurboFrameEncode::HrWriteSource / CFrameEncodeBase::WriteSource) that can be made user-controlled via heap spraying, enabling instruction pointer control and ROP-based arbitrary code execution when processing a crafted JPEG (e.g., via WIC decoder/encoder WriteSource).Read more ↗
+10 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity31Community discussion across Reddit, Mastodon, and other social sources.