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-2022-21840

CVE-2022-21840: Microsoft Excel RCE Vulnerability

CVE-2022-21840 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.

Published: February 18, 2026

CVE-2022-21840 Overview

CVE-2022-21840 is a Remote Code Execution (RCE) vulnerability affecting Microsoft Office and related products. This vulnerability allows attackers to execute arbitrary code on target systems through specially crafted Office documents. When a user opens a malicious file, the attacker can gain the same privileges as the victim user, potentially leading to complete system compromise.

Critical Impact

Successful exploitation allows remote attackers to execute arbitrary code with user privileges, potentially leading to full system compromise, data theft, and lateral movement within enterprise networks.

Affected Products

  • Microsoft Excel 2013 SP1, 2016 (x86 and x64)
  • Microsoft Office 2013 SP1, 2016, 2019, 2021 LTSC (Windows and macOS)
  • Microsoft Office Online Server
  • Microsoft Office Web Apps 2013 SP1
  • Microsoft SharePoint Enterprise Server 2013 SP1, 2016
  • Microsoft SharePoint Server 2019 and Subscription Edition

Discovery Timeline

  • 2022-01-11 - CVE-2022-21840 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-21840

Vulnerability Analysis

This Remote Code Execution vulnerability exists in the way Microsoft Office handles objects in memory when parsing specially crafted documents. The vulnerability requires user interaction, specifically that a user must open a malicious file delivered via email attachment, web download, or other means.

The attack leverages the network attack vector with low complexity, requiring no privileges on the target system but depending on user interaction to trigger the exploit. Upon successful exploitation, an attacker can achieve high impact to confidentiality, integrity, and availability of the affected system.

The vulnerability affects a broad range of Microsoft Office products spanning multiple versions from Office 2013 through Office 2021 LTSC, including server-side components like SharePoint Server and Office Online Server, significantly expanding the potential attack surface in enterprise environments.

Root Cause

The vulnerability stems from improper memory handling within Microsoft Office components when processing certain document elements. The specific technical details have not been publicly disclosed by Microsoft, categorized as "NVD-CWE-noinfo" indicating the specific weakness enumeration is not available.

This type of memory corruption vulnerability typically occurs when the application fails to properly validate or sanitize input data within document structures, leading to memory safety issues that can be leveraged for code execution.

Attack Vector

The attack vector is network-based, meaning the malicious payload can be delivered remotely. A typical attack scenario involves:

  1. Attacker crafts a malicious Office document (Excel, Word, etc.) containing the exploit payload
  2. The document is delivered to the victim via phishing email, malicious website, or shared network location
  3. When the victim opens the document, the malicious code executes with the user's privileges
  4. The attacker gains the ability to install programs, view/modify data, or create new accounts

The vulnerability mechanism exploits improper memory handling in Microsoft Office document parsing routines. When a specially crafted document is opened, the malicious content triggers memory corruption that allows an attacker to redirect execution flow and run arbitrary code. For detailed technical information, refer to the Microsoft Security Advisory for CVE-2022-21840.

Detection Methods for CVE-2022-21840

Indicators of Compromise

  • Suspicious Office documents with unusual embedded objects or macros received via email
  • Office application processes spawning unexpected child processes (cmd.exe, PowerShell, etc.)
  • Network connections initiated by Office applications to unknown external hosts
  • Abnormal memory allocation patterns in Office application processes

Detection Strategies

  • Monitor for Office applications (EXCEL.EXE, WINWORD.EXE) creating child processes, particularly command interpreters
  • Implement email security scanning to detect malicious Office document attachments
  • Deploy endpoint detection rules to identify Office processes making unusual network connections
  • Enable Windows Defender Exploit Guard Attack Surface Reduction rules for Office applications

Monitoring Recommendations

  • Enable detailed logging for Microsoft Office applications and review for anomalous behavior
  • Configure SIEM rules to alert on Office processes with suspicious parent-child process relationships
  • Monitor file system activity for Office applications writing to sensitive directories or creating executable files
  • Track network telemetry for Office applications communicating with newly registered or suspicious domains

How to Mitigate CVE-2022-21840

Immediate Actions Required

  • Apply the January 2022 Microsoft security updates to all affected Office installations immediately
  • Enable Protected View for files originating from the Internet, email attachments, and other untrusted locations
  • Block macro execution in Office documents from the Internet using Group Policy
  • Educate users about the risks of opening Office documents from untrusted sources

Patch Information

Microsoft released security updates to address this vulnerability as part of the January 2022 Patch Tuesday release. Organizations should apply the appropriate updates based on their installed Office versions:

  • Updates are available through Windows Update, Microsoft Update Catalog, and WSUS
  • For detailed patch information and download links, refer to the Microsoft Security Update Guide
  • SharePoint Server and Office Online Server administrators should apply the corresponding server-side updates

Workarounds

  • Configure Microsoft Office to open documents in Protected View by default
  • Disable the loading of ActiveX controls in Office documents via Group Policy
  • Use Application Guard for Office to isolate potentially malicious documents
  • Implement strict email attachment policies to quarantine Office documents for analysis before delivery
bash
# Group Policy Configuration - Block macros from Internet
# Navigate to: User Configuration > Administrative Templates > Microsoft Office > Security Settings
# Enable: "Block macros from running in Office files from the Internet"

# Registry equivalent for blocking macros from Internet (Office 2016+)
reg add "HKCU\Software\Microsoft\Office\16.0\Excel\Security" /v "blockcontentexecutionfrominternet" /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Office\16.0\Word\Security" /v "blockcontentexecutionfrominternet" /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Office\16.0\PowerPoint\Security" /v "blockcontentexecutionfrominternet" /t REG_DWORD /d 1 /f

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechMicrosoft Excel

  • SeverityHIGH

  • CVSS Score8.8

  • EPSS Probability7.20%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • NVD-CWE-noinfo
  • Technical References
  • Microsoft CVE-2022-21840 Update

  • Microsoft Security Advisory CVE-2022-21840
  • Related CVEs
  • CVE-2024-20673: Microsoft Excel RCE Vulnerability

  • CVE-2024-43106: Microsoft Excel Privilege Escalation

  • CVE-2022-22716: Microsoft Excel Information Disclosure
Default Legacy - Prefooter | 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