NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
.NET
.NET NuGet
Not in CISA KEV
CRITICAL severity

CVE-2024-0057 — NuGet.CommandLine

CRITICALFix: NuGet/NuGet.Client@3333f35

CVE-2024-0057 is a critical-severity (CVSS 9.8) Improper Input Validation vulnerability in NuGet.CommandLine. A fix is available for NuGet.CommandLine — see the affected versions and patch details below.

NuGet Client Security Feature Bypass Vulnerability

Also known asBIT-dotnet-2024-0057BIT-dotnet-sdk-2024-0057BIT-powershell-2024-0057GHSA-68w7-72jg-6qpp
Published
Updated
Affected
14 pkgs
Patched
14 / 14
Exploits
None indexed
Exploitation data as of Nov 4, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
2.8%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs86th percentile — riskier than 86% of all scored CVEsHighest risk
2.25%2.88%3.51%4.13%3.6%2.8%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

14 pkgs affected
.NETNuGet.CommandLine.NETNuGet.Packaging.NETNuGet.CommandLine.NETNuGet.Packaging.NETNuGet.CommandLine.NETNuGet.Packaging.NETNuGet.CommandLine.NETNuGet.Packaging+6 more

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects NuGet packages — download data is not available via public APIs for these ecosystems.

Description

Description

Microsoft is releasing this security advisory to provide information about a vulnerability in .NET 6.0, .NET 7.0 and .NET 8.0. This advisory also provides guidance on what developers can do to update their applications to address this vulnerability.

A security feature bypass vulnerability exists when Microsoft .NET Framework-based applications use X.509 chain building APIs but do not completely validate the X.509 certificate due to a logic flaw. An attacker could present an arbitrary untrusted certificate with malformed signatures, triggering a bug in the framework. The framework will correctly report that X.509 chain building failed, but it will return an incorrect reason code for the failure. Applications which utilize this reason code to make their own chain building trust decisions may inadvertently treat this scenario as a successful chain build. This could allow an adversary to subvert the app's typical authentication logic.

Affected software

NuGet & NuGet Packages

  • Any NuGet.exe, NuGet.CommandLine, NuGet.Packaging 6.8.0 version or earlier.
  • Any NuGet.exe, NuGet.CommandLine, NuGet.Packaging 6.7.0 version or earlier.
  • Any NuGet.exe, NuGet.CommandLine, NuGet.Packaging 6.6.1 version or earlier.
  • Any NuGet.exe, NuGet.CommandLine, NuGet.Packaging 6.4.2 version or earlier.
  • Any NuGet.exe, NuGet.CommandLine, NuGet.Packaging 6.3.3 version or earlier.
  • Any NuGet.exe, NuGet.CommandLine, NuGet.Packaging 6.0.5 version or earlier.
  • Any NuGet.exe, NuGet.CommandLine, NuGet.Packaging 5.11.5 version or earlier.

.NET SDK(s)

  • Any .NET SDK 6.0.126 or earlier, or 6.0.418 or earlier.
  • Any .NET SDK 7.0.115 or earlier, or 7.0.312 or earlier, or 7.0.405 or earlier.
  • Any .NET SDK 8.0.101 or earlier.

Patches

To fix the issue, please install the latest version of .NET 6.0, .NET 7.0 or .NET 8.0 and NuGet (NuGet.exe, NuGet.CommandLine, NuGet. Packaging versions). If you have installed one or more .NET SDKs through Visual Studio, Visual Studio will prompt you to update Visual Studio, which will also update your .NET SDKs.

Other details

Announcement for this issue can be found at https://github.com/NuGet/Announcements/issues/71

MSRC details for this can be found at CVE-2024-0057 - Security Update Guide - Microsoft - NET, .NET Framework, and Visual Studio Security Feature Bypass Vulnerability

Affected Packages

14 total 14 fixed
EcosystemPackageVulnerable rangeFix
.NETNuGetNuGet.CommandLine≥ 4.6.0&&< 5.11.65.11.6dotnet add package NuGet.CommandLine --version 5.11.6
.NETNuGetNuGet.Packaging≥ 4.6.0&&< 5.11.65.11.6dotnet add package NuGet.Packaging --version 5.11.6
.NETNuGetNuGet.CommandLine≥ 6.0.0&&< 6.0.66.0.6dotnet add package NuGet.CommandLine --version 6.0.6
.NETNuGetNuGet.Packaging≥ 6.0.0&&< 6.0.66.0.6dotnet add package NuGet.Packaging --version 6.0.6
.NETNuGetNuGet.CommandLine≥ 6.3.0&&< 6.3.46.3.4dotnet add package NuGet.CommandLine --version 6.3.4
.NETNuGetNuGet.Packaging≥ 6.3.0&&< 6.3.46.3.4dotnet add package NuGet.Packaging --version 6.3.4

Affected Products

4 products · 24 configurations
Application
.netmicrosoft
≥ 7.0.0 && < 7.0.15
1 version
8.0.0
Application
.net frameworkmicrosoft
≥ 4.8 && < 4.8.04690.02
8 versions
2.03.03.54.6.24.74.7.14.7.24.8.1
Application
powershellmicrosoft
≥ 7.3 && < 7.3.11
1 version
7.4
Application
visual studio 2022microsoft
≥ 17.8 && < 17.8.4
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for NuGet.CommandLine, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update NuGet.CommandLine to 5.11.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-0057 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatImportant

The ability for an attacker to exploit this vulnerability by presenting an arbitrary untrusted certificate with malformed signatures can lead to a breach in the application's authentication logic. This loophole poses a serious threat, as it could lead to unauthorized access, data breaches, and the compromise of…

Workaround published by Red Hat
Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
Source: Red Hat security advisory for CVE-2024-0057 (CC BY 4.0)
ProductFixed inAdvisory
.NET Core on Red Hat Enterprise Linuxrh-dotnet60-dotnet-0:6.0.126-1.el7_9RHSA-2024:0255
Red Hat Enterprise Linux 8dotnet8.0-0:8.0.101-1.el8_9RHSA-2024:0150
Red Hat Enterprise Linux 8dotnet7.0-0:7.0.115-1.el8_9RHSA-2024:0157
Red Hat Enterprise Linux 8dotnet6.0-0:6.0.126-1.el8_9RHSA-2024:0158
Red Hat Enterprise Linux 9dotnet7.0-0:7.0.115-1.el9_3RHSA-2024:0151
Red Hat Enterprise Linux 9dotnet8.0-0:8.0.101-1.el9_3RHSA-2024:0152
Red Hat Enterprise Linux 9dotnet6.0-0:6.0.126-1.el9_3RHSA-2024:0156

Frequently Asked Questions

### Description Microsoft is releasing this security advisory to provide information about a vulnerability in .NET 6.0, .NET 7.0 and .NET 8.0. This advisory also provides guidance on what developers can do to update their applications to address this vulnerability. A security feature bypass vulnerability exists when Microsoft .NET Framework-based applications use X.509 chain building APIs but do not completely validate the X.509 certificate due to a logic flaw. An attacker could present an arbitrary untrusted certificate with malformed signatures, triggering a bug in the framework. The frame
O3 Security · Impact-Aware SCA

Is CVE-2024-0057 in your dependencies?

Find it across NuGet, including transitive dependencies.

CVE-2024-0057: NuGet.CommandLine — Fixed in 5.11.6