CVE-2022-41032: NuGet Elevation of Privilege Vulnerability
7.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.93978%
CWE
Published
10/11/2022
Updated
2/28/2025
KEV Status
No
Technology
C#
Technical Details
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| NuGet.Commands | nuget | >= 4.6.0, < 4.9.6 | 4.9.6 |
| NuGet.Commands | nuget | >= 5.0.0, < 5.7.3 | 5.7.3 |
| NuGet.Commands | nuget | >= 5.8.0, < 5.9.3 | 5.9.3 |
| NuGet.Commands | nuget | >= 5.10.0, < 5.11.3 | 5.11.3 |
| NuGet.Commands | nuget | >= 6.0.0, < 6.0.3 | 6.0.3 |
| NuGet.Commands | nuget | >= 6.1.0, < 6.2.2 | 6.2.2 |
| NuGet.Commands | nuget | >= 6.3.0, < 6.3.1 | 6.3.1 |
| NuGet.CommandLine | nuget | >= 4.6.0, < 4.9.6 | 4.9.6 |
| NuGet.CommandLine | nuget | >= 5.0.0, < 5.7.3 | 5.7.3 |
| NuGet.CommandLine | nuget | >= 5.8.0, < 5.9.3 | 5.9.3 |
| NuGet.CommandLine | nuget | >= 5.10.0, < 5.11.3 | 5.11.3 |
| NuGet.CommandLine | nuget | >= 6.0.0, < 6.0.3 | 6.0.3 |
| NuGet.CommandLine | nuget | >= 6.1.0, < 6.2.2 | 6.2.2 |
| NuGet.CommandLine | nuget | >= 6.3.0, < 6.3.1 | 6.3.1 |
| NuGet.Protocol | nuget | >= 4.6.0, < 4.9.6 | 4.9.6 |
| NuGet.Protocol | nuget | >= 5.0.0, < 5.7.3 | 5.7.3 |
| NuGet.Protocol | nuget | >= 5.8.0, < 5.9.3 | 5.9.3 |
| NuGet.Protocol | nuget | >= 5.10.0, < 5.11.3 | 5.11.3 |
| NuGet.Protocol | nuget | >= 6.0.0, < 6.0.3 | 6.0.3 |
| NuGet.Protocol | nuget | >= 6.1.0, < 6.2.2 | 6.2.2 |
| NuGet.Protocol | nuget | >= 6.3.0, < 6.3.1 | 6.3.1 |
Vulnerability Intelligence
Miggo AI
Root 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.