Miggo Logo

CVE-2022-41032: NuGet Elevation of Privilege Vulnerability

7.8

CVSS Score
3.1

Basic Information

EPSS Score
0.93978%
Published
10/11/2022
Updated
2/28/2025
KEV Status
No
Technology
TechnologyC#

Technical Details

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
NuGet.Commandsnuget>= 4.6.0, < 4.9.64.9.6
NuGet.Commandsnuget>= 5.0.0, < 5.7.35.7.3
NuGet.Commandsnuget>= 5.8.0, < 5.9.35.9.3
NuGet.Commandsnuget>= 5.10.0, < 5.11.35.11.3
NuGet.Commandsnuget>= 6.0.0, < 6.0.36.0.3
NuGet.Commandsnuget>= 6.1.0, < 6.2.26.2.2
NuGet.Commandsnuget>= 6.3.0, < 6.3.16.3.1
NuGet.CommandLinenuget>= 4.6.0, < 4.9.64.9.6
NuGet.CommandLinenuget>= 5.0.0, < 5.7.35.7.3
NuGet.CommandLinenuget>= 5.8.0, < 5.9.35.9.3
NuGet.CommandLinenuget>= 5.10.0, < 5.11.35.11.3
NuGet.CommandLinenuget>= 6.0.0, < 6.0.36.0.3
NuGet.CommandLinenuget>= 6.1.0, < 6.2.26.2.2
NuGet.CommandLinenuget>= 6.3.0, < 6.3.16.3.1
NuGet.Protocolnuget>= 4.6.0, < 4.9.64.9.6
NuGet.Protocolnuget>= 5.0.0, < 5.7.35.7.3
NuGet.Protocolnuget>= 5.8.0, < 5.9.35.9.3
NuGet.Protocolnuget>= 5.10.0, < 5.11.35.11.3
NuGet.Protocolnuget>= 6.0.0, < 6.0.36.0.3
NuGet.Protocolnuget>= 6.1.0, < 6.2.26.2.2
NuGet.Protocolnuget>= 6.3.0, < 6.3.16.3.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from NuGet creating world-writable cache directories on Unix systems due to improper permission handling. The commit shows replacement of DirectoryUtility.CreateSharedDirectory (which ignored umask) with Directory.CreateDirectory (which respects umask). The added Migration1.Run function cleans up existing vulnerable directories, demonstrating the prior insecure state. These changes directly address CWE-269 by enforcing proper privilege management through umask compliance and directory permission corrections.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

## **s*ription Mi*roso*t is r*l**sin* t*is s**urity **visory to provi** in*orm*tion **out * vuln*r**ility in .N*T *.*.*-r*, .N*T *.*, .N*T *or* *.*, *n* Nu**t (Nu**t.*x*, Nu**t.*omm*n*s, Nu**t.*omm*n*Lin*, Nu**t.Proto*ol). T*is **visory *lso provi**

Reasoning

T** vuln*r**ility st*mm** *rom Nu**t *r**tin* worl*-writ**l* ***** *ir**tori*s on Unix syst*ms *u* to improp*r p*rmission **n*lin*. T** *ommit s*ows r*pl***m*nt o* `*ir**toryUtility.*r**t*S**r***ir**tory` (w*i** i*nor** um*sk) wit* `*ir**tory.*r**t**