NuGetGallery Spoofing Vulnerability (CVE-2020-1340)
NuGetGallery did not properly sanitise package metadata values, allowing an attacker with package upload permissions to publish specially crafted content that could run scripts in the security context of a user viewing the malicious content. The security update corrects how NuGetGallery sanitises input.
Originally disclosed on Microsoft
Description
A spoofing vulnerability exists when the NuGetGallery does not properly sanitize input on package metadata values. An attacker who successfully exploited the vulnerability could perform cross-site scripting attacks and run scripts in the security context of the user viewing the malicious content. To exploit this vulnerability, an attacker with permissions to upload packages could publish specially crafted content on a gallery page. The security update addresses the vulnerability by correcting how NuGetGallery sanitizes input.
Open Source Software
Open Source Software
Microsoft
Microsoft
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 the gallery rendered package metadata without adequate output encoding or sanitisation, so attacker-controlled values were interpreted as active content.
Impact
An attacker with package upload permissions could run scripts in the security context of a user viewing the malicious content, though the text does not state which browsers or defences were involved.
What the attacker needed
Permission to upload packages
The fix
The vulnerability was fixed by a security update that corrects how NuGetGallery sanitises input.
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.
Package metadata is the descriptive information shown on a package's page, such as its name or description. If a website displays that information without cleaning it first, an attacker can hide code in it that runs in the browser of anyone who views the page. This is called cross-site scripting, and it lets the attacker act as the victim on that site.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.