Vulnerability · Published Feb 17, 2024 · Assigned by snyk
CVE-2024-21496
Medium 6.1
In plain English
A medium-severity cross-site scripting in github.com/greenpau/caddy-security. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 48% of all known vulnerabilities).
Official description
All versions of the package github.com/greenpau/caddy-security are vulnerable to Cross-site Scripting (XSS) via the Referer header, due to improper input sanitization. Although the Referer header is sanitized by escaping some characters that can allow XSS (e.g., [&], [<], [>], ["], [']), it does not account for the attack based on the JavaScript URL scheme (e.g., javascript:alert(document.domain)// payload). Exploiting this vulnerability may not be trivial, but it could lead to the execution of malicious scripts in the context of the target user’s browser, compromising user sessions.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Go | github.com/greenpau/caddy-security | no fix listed | GHSA-ff72-ff42-c3gw |
| Go | github.com/greenpau/caddy-security | no fix listed | GO-2024-2559 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| n/a | github.com/greenpau/caddy-security | 0 – before * |
Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N/E:P