CVE-2025-21173

Creation of Temporary File in Directory with Insecure Permissions
Affects
.NET Runtime
in
.NET
No items found.
Versions
>= 6.0.0 <= 6.0.36 >= 8.0.0 <= 8.0.11 <= 9.0.0

Patch Available.

Exclamation circle icon
Patch Available

This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.

Overview

.NET is a free, open-source, cross-platform framework for building modern apps and powerful cloud services. It consists of a runtime and a developer platform SDK made up of tools, programming languages, and libraries for building many different types of applications. 

‍

A vulnerability (CVE-2025-21173) exists in the .NET SDK as a result of insecure temp file usage on Linux that allows local system privilege escalation by attackers. 

‍

Per CWE-379: Creation of Temporary File in Directory with Insecure Permissions, is when a product creates a temporary file in a directory whose permissions allow unintended actors to determine the file's existence or otherwise access that file.

‍

This issue affects Linux installations of .NET.

‍

Additionally, if you've deployed self-contained applications targeting any of the impacted versions, these applications are also vulnerable and must be recompiled and redeployed.

‍

Details

Module Info

  • Product: 
  • Any .NET 6.0 application running on Linux installations of .NET 6.0.36 or earlier.
  • Any .NET 8.0 application running on Linux installations of .NET 8.0.11 or earlier.
  • Any .NET 9.0 application running on Linux installations of .NET 9.0.0 or earlier.

‍

Vulnerability Info

This High-severity vulnerability is found in the .NET SDK. This only affects .NET on Linux operating systems. An attacker could exploit this vulnerability by writing a specially crafted file in the security context of the local system.

‍

Mitigation

.NET 6.x is End-of-Life and will not receive any updates to address this issue. For more information see .NET and .NET Core official support policy.

‍

Users of the affected components should apply one of the following mitigations:

  • Upgrade affected applications to one of:
    • .NET >= 8.0.12
    • .NET >= 9.0.1
  • Leverage a commercial support partner like HeroDevs for post-EOL security support.

‍

Credits

  • Daniel Plaisted with Microsoft
  • Noah Gilson with Microsoft
Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
High
ID
CVE-2025-21173
PROJECT Affected
.NET Runtime
Versions Affected
>= 6.0.0 <= 6.0.36 >= 8.0.0 <= 8.0.11 <= 9.0.0
NES Versions Affected
Published date
April 4, 2025
≈ Fix date
April 4, 2025
Fixed in
Category
Creation of Temporary File in Directory with Insecure Permissions
Vex Document
Download VEXHow do I use it?
Sign up for the latest vulnerability alerts fixed in
NES for .NET
Rss feed icon
Subscribe via RSS
or

By submitting the form I acknowledge receipt of our Privacy Policy.

Thanks for signing up for our Newsletter! We look forward to connecting with you.
Oops! Something went wrong while submitting the form.