Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2025-59226

CVE-2025-59226: Microsoft 365 Apps Use-After-Free Flaw

CVE-2025-59226 is a use-after-free vulnerability in Microsoft Office Visio that enables unauthorized attackers to execute code locally. This article covers the technical details, affected versions, impact, and mitigation.

Published:

CVE-2025-59226 Overview

CVE-2025-59226 is a use-after-free vulnerability [CWE-416] in Microsoft Office Visio that allows an unauthorized attacker to execute arbitrary code locally. The flaw affects Microsoft 365 Apps and Microsoft Office Long Term Servicing Channel (LTSC) 2021 and 2024 on both x86 and x64 platforms. Exploitation requires user interaction, typically opening a crafted Visio document. Successful exploitation yields code execution in the context of the current user, compromising confidentiality, integrity, and availability.

Critical Impact

An attacker who tricks a user into opening a malicious Visio file can execute arbitrary code on the target system with the user's privileges, leading to full data compromise on the affected host.

Affected Products

  • Microsoft 365 Apps (Enterprise, x86 and x64)
  • Microsoft Office LTSC 2021 (x86 and x64)
  • Microsoft Office LTSC 2024 (x86 and x64)

Discovery Timeline

  • 2025-10-14 - CVE-2025-59226 published to the National Vulnerability Database
  • 2025-10-14 - Microsoft published the security advisory for CVE-2025-59226
  • 2025-10-16 - Last updated in NVD database

Technical Details for CVE-2025-59226

Vulnerability Analysis

The vulnerability resides in Microsoft Office Visio's handling of objects in memory when parsing Visio diagram files. A use-after-free condition occurs when the application references a memory region after it has been freed, allowing an attacker to control the contents of that memory before it is reused.

Exploitation requires local access and user interaction. The attacker must convince a target to open a specially crafted Visio file, for example through phishing or a malicious download. No privileges are required prior to exploitation, since the code executes under the identity of the user opening the file.

Successful exploitation yields code execution in the current user context. If the user holds administrative rights, the attacker can take full control of the host. The scope is unchanged, meaning the compromise is bounded by the user's existing privileges on the affected system.

Root Cause

The root cause is improper memory management in Visio's document parsing logic, classified under [CWE-416] Use After Free. The application retains a dangling pointer to a freed object. When the freed memory is later dereferenced, an attacker who has placed controlled data in that region can redirect execution flow.

Attack Vector

The attack vector is local and file-based. An attacker delivers a malicious .vsd, .vsdx, or related Visio file via email attachment, web download, or shared drive. When the victim opens the file in a vulnerable Visio client, the parsing routine triggers the use-after-free condition and executes attacker-controlled code.

No verified public proof-of-concept code is available for this vulnerability. Refer to the Microsoft Security Update Guide CVE-2025-59226 for vendor-supplied technical context.

Detection Methods for CVE-2025-59226

Indicators of Compromise

  • Unexpected child processes spawned by VISIO.EXE, such as cmd.exe, powershell.exe, wscript.exe, or rundll32.exe.
  • Visio process crashes followed by execution of unsigned binaries written to user-writable directories.
  • Inbound Visio files (.vsd, .vsdx, .vsdm) originating from untrusted email senders or external file shares.
  • Outbound network connections initiated by VISIO.EXE to non-Microsoft infrastructure shortly after document open.

Detection Strategies

  • Hunt for process lineage where VISIO.EXE is the parent of script interpreters or LOLBins.
  • Inspect Office telemetry and Windows Event Logs for application crashes in Visio coinciding with file-open events.
  • Use endpoint behavioral analytics to flag memory corruption patterns and post-exploitation activity such as token theft or persistence creation.

Monitoring Recommendations

  • Monitor email gateways and web proxies for Visio file attachments from external sources and quarantine those without business justification.
  • Track file-write events to autorun locations (Run registry keys, Startup folder, scheduled tasks) following Visio document interactions.
  • Aggregate Office application crash telemetry into the SIEM and correlate with subsequent process creation and network activity.

How to Mitigate CVE-2025-59226

Immediate Actions Required

  • Apply the October 2025 Microsoft security updates to all affected Microsoft 365 Apps and Office LTSC 2021/2024 installations.
  • Inventory endpoints running vulnerable Visio versions using configuration management or vulnerability scanning tools.
  • Restrict opening of Visio files received from external or untrusted sources until patches are deployed.
  • Reinforce phishing awareness for users who routinely handle Visio diagrams.

Patch Information

Microsoft released a security update addressing CVE-2025-59226 on October 14, 2025. Refer to the Microsoft Security Update Guide CVE-2025-59226 for the specific build numbers and KB articles applicable to each affected channel. Click-to-Run installations of Microsoft 365 Apps update automatically when configured to receive current channel updates.

Workarounds

  • Enable Protected View for files originating from the internet and other untrusted locations to mitigate parsing of attacker-controlled content.
  • Block Visio file types at the email gateway or apply attachment-scanning policies that detonate documents in a sandbox before delivery.
  • Configure Attack Surface Reduction (ASR) rules in Microsoft Defender to block Office applications from creating child processes.
bash
# Example: Enable the ASR rule that blocks Office apps from creating child processes
Set-MpPreference -AttackSurfaceReductionRules_Ids D4F940AB-401B-4EFC-AADC-AD5F3C50688A `
                 -AttackSurfaceReductionRules_Actions Enabled

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.