NuGet Client Remote Code Execution Vulnerability (CVE-2023-29337)
A race condition in the NuGet client allows a local attacker to perform a symlink attack when the victim runs the nuget command, potentially leading to remote code execution in the context of the server's account. The attacker must be authenticated and win the race condition.
Originally disclosed on Microsoft
FAQ
According to the CVSS metric, user interaction is required (UI:R) and privileges required is low (PR:L). What does that mean for this vulnerability? An authorized attacker must be on the machine and monitoring for actions as a step to exploit the race condition.
FAQ
According to the CVSS metric, the attack complexity is high (AC:H). What does that mean for this vulnerability? Successful exploitation of this vulnerability requires an attacker to win a race condition.
FAQ
How could an attacker exploit this vulnerability? A local attacker in the environment could exploit a race condition that allows a symlink attack when the victim user on the same system runs the nuget command.
FAQ
According to the CVSS metric, the attack vector is network (AV:N), and privilege required is low (PR:L). What is the target used in the context of the remote code execution? The attacker for this vulnerability could target the server accounts in an arbitrary or remote code execution. As an authenticated user, the attacker could attempt to trigger malicious code in the context of the server's account through a network call. The privilege requirement is low because the attacker needs to be authenticated as a normal user.
NuGet Client
NuGet Client
Microsoft
Microsoft
Customer Action Required
Yes
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a time-of-check to time-of-use flaw where the NuGet client follows a symbolic link that an attacker can replace between check and use.
Impact
An authenticated local attacker could achieve remote code execution in the context of the server's account, but only if they win the race condition.
What the attacker needed
Authenticated local user; victim runs nuget command; attacker wins race condition
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A race condition is when two actions happen at nearly the same time and the order matters. Here, an attacker on the same machine tries to swap a file for a link (a symlink) at the exact moment the NuGet tool uses it, so the tool ends up running the attacker's code. The attacker needs a normal account on that machine and must be lucky with timing.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.