The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-21387

CVE-2025-21387: Microsoft Excel RCE Vulnerability

CVE-2025-21387 is a remote code execution vulnerability in Microsoft Excel that allows attackers to execute arbitrary code on affected systems. This article covers the technical details, affected versions, and mitigation.

Updated: January 22, 2026

CVE-2025-21387 Overview

CVE-2025-21387 is a remote code execution vulnerability affecting Microsoft Excel and related Microsoft Office products. This Use-After-Free (CWE-416) vulnerability allows attackers to execute arbitrary code on affected systems when a user opens a specially crafted Excel file. The vulnerability requires user interaction, as the target must open a malicious document for exploitation to succeed.

Critical Impact

Successful exploitation of this vulnerability could allow an attacker to execute arbitrary code with the privileges of the current user, potentially leading to full system compromise, data theft, or lateral movement within an organization's network.

Affected Products

  • Microsoft 365 Apps (Enterprise, x64 and x86)
  • Microsoft Excel 2016 (x64 and x86)
  • Microsoft Office 2019 (x64 and x86)
  • Microsoft Office Long Term Servicing Channel 2021 and 2024 (Windows and macOS)
  • Microsoft Office Online Server

Discovery Timeline

  • February 11, 2025 - CVE-2025-21387 published to NVD
  • July 1, 2025 - Last updated in NVD database

Technical Details for CVE-2025-21387

Vulnerability Analysis

This vulnerability is classified as a Use-After-Free (UAF) memory corruption issue within Microsoft Excel. Use-After-Free vulnerabilities occur when a program continues to use a pointer after the memory it references has been freed. In the context of Excel, this flaw likely exists in the document parsing or rendering engine, where memory management for complex spreadsheet objects can be exploited.

The local attack vector indicates that exploitation requires the attacker to deliver a malicious file to the victim, typically via email attachment, file share, or download. Once the victim opens the crafted Excel file, the vulnerability is triggered during document processing. The lack of privilege requirements combined with the need for user interaction creates a classic social engineering attack scenario.

Root Cause

The root cause of CVE-2025-21387 is a Use-After-Free (CWE-416) condition in Microsoft Excel's memory management routines. This type of vulnerability typically arises when:

  1. Memory is allocated for an object during spreadsheet processing
  2. The memory is subsequently freed but the pointer to that memory is not nullified
  3. The application later attempts to use the dangling pointer
  4. An attacker can control the contents of the reallocated memory, redirecting execution flow

The vulnerability allows attackers to corrupt memory in a controlled manner, potentially overwriting function pointers or vtable entries to achieve code execution.

Attack Vector

The attack vector for CVE-2025-21387 is local, requiring user interaction to exploit. A typical attack scenario involves:

  1. Delivery Phase: The attacker crafts a malicious Excel file (.xlsx, .xlsm, .xlsb, or similar) containing specially constructed data that triggers the UAF condition
  2. Social Engineering: The malicious file is delivered to the target via phishing email, compromised website, or shared network drive
  3. Execution Phase: When the victim opens the file in Microsoft Excel, the vulnerability is triggered during document parsing
  4. Code Execution: The attacker achieves arbitrary code execution in the context of the user's session

The vulnerability affects both Windows and macOS versions of affected Office products, expanding the potential attack surface across enterprise environments.

Detection Methods for CVE-2025-21387

Indicators of Compromise

  • Suspicious Excel file attachments from unknown or spoofed senders with unusual file characteristics
  • Excel processes (EXCEL.EXE) spawning unexpected child processes such as cmd.exe, powershell.exe, or wscript.exe
  • Abnormal memory access patterns or crash dumps in Excel indicating memory corruption
  • Unusual network connections originating from Excel processes
  • Windows Event Log entries showing application crashes in Excel with memory-related errors

Detection Strategies

  • Deploy endpoint detection and response (EDR) solutions to monitor for exploitation attempts and suspicious process behavior from Office applications
  • Implement email security solutions to scan and sandbox Excel attachments before delivery to end users
  • Configure application-level logging to capture document open events and monitor for unusual behavior patterns
  • Utilize YARA rules or similar pattern matching to identify potentially malicious Excel files based on structural anomalies

Monitoring Recommendations

  • Monitor for Excel processes spawning child processes, particularly command shells or scripting interpreters
  • Track file system activity for Excel creating or modifying files in unusual locations such as %TEMP% or %APPDATA%
  • Review Windows Defender Application Guard logs if enabled for Office applications
  • Implement network monitoring to detect unusual outbound connections from Excel processes

How to Mitigate CVE-2025-21387

Immediate Actions Required

  • Apply Microsoft security updates immediately to all affected Microsoft Office installations across the organization
  • Enable Protected View for files originating from the Internet in Microsoft Office Trust Center settings
  • Educate users about the risks of opening Excel files from untrusted sources
  • Consider blocking Excel file attachments at the email gateway for files from external senders pending patch deployment
  • Review and restrict macro execution policies to prevent potential follow-on attacks

Patch Information

Microsoft has released security updates to address this vulnerability. Detailed patch information and download links are available in the Microsoft Security Response Center (MSRC) Advisory. Organizations should apply the appropriate updates for their Office version:

  • Microsoft 365 Apps: Updates available through Microsoft Update or Configuration Manager
  • Microsoft Excel 2016: Security update available via Windows Update
  • Microsoft Office 2019: Updates available through Click-to-Run or Microsoft Update
  • Office LTSC 2021/2024: Updates available through Windows Update or volume licensing servicing

Workarounds

  • Enable Protected View for all Office documents to prevent automatic execution of potentially malicious content
  • Implement Application Guard for Office to isolate document rendering in a sandboxed environment
  • Configure file type blocking at email gateways to quarantine Excel files from untrusted sources for manual review
  • Restrict Office macro execution through Group Policy to reduce post-exploitation risk
bash
# PowerShell: Enable Protected View via Registry for all users
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Office\16.0\Excel\Security\ProtectedView" -Name "DisableInternetFilesInPV" -Value 0 -Type DWord
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Office\16.0\Excel\Security\ProtectedView" -Name "DisableAttachementsInPV" -Value 0 -Type DWord
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Office\16.0\Excel\Security\ProtectedView" -Name "DisableUnsafeLocationsInPV" -Value 0 -Type DWord

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechMicrosoft 365 Apps

  • SeverityHIGH

  • CVSS Score7.8

  • EPSS Probability0.45%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-416

  • NVD-CWE-noinfo
  • Vendor Resources
  • Microsoft CVE-2025-21387 Advisory
  • Related CVEs
  • CVE-2020-16918: Microsoft 365 Apps RCE Vulnerability

  • CVE-2024-21413: Microsoft Outlook RCE Vulnerability

  • CVE-2024-38189: Microsoft Project RCE Vulnerability

  • CVE-2025-21354: Microsoft Excel RCE Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English