A Leader in the 2025 Gartner® Magic Quadrant™ for Endpoint Protection Platforms. Five years running.A Leader in the Gartner® Magic Quadrant™Read the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI Security Portfolio
      Leading the Way in AI-Powered Security Solutions
    • 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
    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
    Identity Security
    • Singularity Identity
      Identity Threat Detection and Response
  • 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
      Digital Forensics, IRR & Breach Readiness
    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
    • 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-21173

CVE-2025-21173: Visual Studio 2022 Privilege Escalation

CVE-2025-21173 is a .NET elevation of privilege vulnerability in Microsoft Visual Studio 2022 that allows attackers to gain elevated system privileges. This article covers technical details, affected versions, and mitigation.

Updated: January 22, 2026

CVE-2025-21173 Overview

CVE-2025-21173 is a .NET Elevation of Privilege vulnerability affecting Microsoft Visual Studio 2022 and .NET runtime versions 8.0.0 and 9.0.0 on Linux systems. This vulnerability is classified under CWE-379 (Creation of Temporary File in Directory with Insecure Permissions), which allows local attackers with limited privileges to escalate their access through improper handling of temporary files.

The vulnerability requires local access and user interaction, but once exploited, can lead to complete compromise of confidentiality, integrity, and availability on the affected system.

Critical Impact

Local attackers with low privileges can exploit insecure temporary file handling in .NET to gain elevated privileges, potentially compromising sensitive data and system integrity.

Affected Products

  • Microsoft Visual Studio 2022
  • Microsoft .NET 8.0.0
  • Microsoft .NET 9.0.0 (on Linux)

Discovery Timeline

  • January 14, 2025 - CVE-2025-21173 published to NVD
  • May 6, 2025 - Last updated in NVD database

Technical Details for CVE-2025-21173

Vulnerability Analysis

This elevation of privilege vulnerability stems from how .NET creates and manages temporary files on Linux systems. The weakness relates to CWE-379, which describes scenarios where an application creates temporary files in directories that have insecure permissions. When a privileged process creates temporary files in such locations without proper access controls, a local attacker can manipulate these files to gain elevated privileges.

The vulnerability affects .NET applications running on Linux when using Visual Studio 2022 for development. The local attack vector means an attacker must have some level of access to the target system, but the low privilege requirement indicates that even standard user accounts can potentially exploit this flaw.

Root Cause

The root cause is the creation of temporary files in directories with insecure permissions (CWE-379). When .NET runtime components on Linux create temporary files without enforcing restrictive permissions, race conditions can occur where an attacker substitutes or modifies these files before the legitimate process accesses them. This can lead to privilege escalation if the original process runs with elevated privileges or handles sensitive operations.

Attack Vector

The attack requires local access to the target system with low-privilege credentials. The attacker exploits the window of opportunity between when the .NET application creates a temporary file and when it uses that file. By placing malicious content or symbolic links in predictable temporary file locations, the attacker can trick the application into executing code or accessing files with elevated privileges.

The exploitation scenario typically involves:

  1. Identifying the predictable temporary file location used by .NET
  2. Monitoring for file creation events
  3. Racing to replace or manipulate the temporary file
  4. Causing the vulnerable application to process the malicious content with elevated privileges

Detection Methods for CVE-2025-21173

Indicators of Compromise

  • Unusual file operations in /tmp or other temporary directories involving .NET processes
  • Symbolic link creation attempts targeting temporary files created by .NET applications
  • Unexpected privilege escalation events associated with dotnet or Visual Studio processes
  • File permission anomalies in temporary directories used by .NET runtime

Detection Strategies

  • Monitor file system events in temporary directories for suspicious race condition patterns
  • Implement audit logging for privilege escalation attempts on systems running .NET applications
  • Use SentinelOne's behavioral AI to detect anomalous process privilege changes
  • Review .NET application logs for unusual file access errors or permission denied messages

Monitoring Recommendations

  • Enable detailed auditing on Linux systems for file creation in /tmp and application-specific temp directories
  • Configure alerts for unexpected privilege escalation events involving .NET runtime processes
  • Deploy endpoint detection solutions capable of identifying TOCTOU (Time-of-Check Time-of-Use) attack patterns
  • Monitor for symbolic link creation activity targeting .NET temporary file paths

How to Mitigate CVE-2025-21173

Immediate Actions Required

  • Apply Microsoft security updates for .NET 8.0 and 9.0 as outlined in the Microsoft Security Update Guide
  • Update Visual Studio 2022 to the latest patched version
  • Review and restrict permissions on temporary directories used by .NET applications
  • Audit systems for signs of exploitation attempts

Patch Information

Microsoft has released security updates to address this vulnerability. Administrators should consult the Microsoft Security Update Guide for specific patch details and installation instructions. The patches ensure that .NET creates temporary files with appropriate restrictive permissions, eliminating the race condition window.

Workarounds

  • Configure dedicated temporary directories with restricted permissions for .NET applications
  • Use Linux-specific security controls like mount options (noexec, nosuid) on temporary filesystems
  • Implement application-level sandboxing to limit the impact of potential privilege escalation
  • Consider containerizing .NET applications to isolate them from the host filesystem
bash
# Harden temporary directory permissions for .NET applications
chmod 700 /var/tmp/dotnet
chown root:root /var/tmp/dotnet

# Mount /tmp with security options (in /etc/fstab)
# tmpfs /tmp tmpfs defaults,noexec,nosuid,nodev 0 0

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

  • Vulnerability Details
  • TypePrivilege Escalation

  • Vendor/TechMicrosoft Visual Studio

  • SeverityHIGH

  • CVSS Score7.3

  • EPSS Probability6.30%

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

  • NVD-CWE-noinfo
  • Technical References
  • HeroDevs Vulnerability Directory
  • Vendor Resources
  • Microsoft Security Update Guide
  • Related CVEs
  • CVE-2025-47959

  • CVE-2025-30399

  • CVE-2025-26646
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
  • English
  • 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