What’s Vulnerable › Vulnerabilities
CVE-2024-37304: NuGetGallery's Markdown Autolinks Processing Vulnerable to Cross-site Scripting
- Severity: medium (CVSS 6.1 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.7% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-06-12 · updated 2026-06-17
- Weakness: CWE-79
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
- NuGetGallery: before 2024.05.28 — fixed in 2024.05.28
- NuGetGallery: before 2024.05.28
How to fix
Upgrade to a fixed version: NuGetGallery 2024.05.28. Check the vendor advisory for mitigations.
References
- https://github.com/NuGet/NuGetGallery/commit/c52b023659f4ad7b626874c1063f2b5e878a4fe0
- https://github.com/NuGet/NuGetGallery/pull/9836
- https://github.com/NuGet/NuGetGallery/security/advisories/GHSA-gwjh-c548-f787
- https://github.com/NuGet/NuGetGallery/commit/c52b023659f4ad7b626874c1063f2b5e878a4fe0
- https://github.com/NuGet/NuGetGallery/pull/9836
- https://github.com/NuGet/NuGetGallery/security/advisories/GHSA-gwjh-c548-f787
Get alerted when CVE-2024-37304 or the next vulnerability affects your stack