Vulnerability · Published Jun 12, 2024 · Assigned by GitHub_M
CVE-2024-37304NuGetGallery's Markdown Autolinks Processing Vulnerable to Cross-site Scripting
Medium 6.1
In plain English
A medium-severity cross-site scripting in NuGetGallery from NuGet. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 51% of all known vulnerabilities).
Official description
NuGet Gallery is a package repository that powers nuget.org. The NuGetGallery has a security vulnerability related to its handling of autolinks in Markdown content. While the platform properly filters out JavaScript from standard links, it does not adequately sanitize autolinks. This oversight allows attackers to exploit autolinks as a vector for Cross-Site Scripting (XSS) attacks. When a user inputs a Markdown autolink such as `<javascript:alert(1)>`, the link is rendered without proper sanitization. This means that the JavaScript code within the autolink can be executed by the browser, leading to an XSS attack. Version 2024.05.28 contains a patch for this issue.
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| NuGet | NuGetGallery | < 2024.05.28 |
Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
References
- https://github.com/NuGet/NuGetGallery/security/advisories/GHSA-gwjh-c548-f787 x_refsource_CONFIRM
- https://github.com/NuGet/NuGetGallery/pull/9836 x_refsource_MISC
- https://github.com/NuGet/NuGetGallery/commit/c52b023659f4ad7b626874c1063f2b5e878a4fe0 x_refsource_MISC