CVE-2024-21496
JSON

6.1medium

Cross-site Scripting in github.com/greenpau/caddy-security

Severity
6.1medium CVSS:3.1 by snyk
Exploit likelihood
0.58% (higher than 48% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
snyk
Also known as
GHSA-ff72-ff42-c3gwGO-2024-2559

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

Product or packageVersionsReported by
github.com/greenpau/caddy-securitybefore *CVE List
github.com/greenpau/caddy-security (Go)up to 1.1.23, all versionsGitHub Advisory Database, Go Vulnerability Database
authcrunch caddy-securityNot specifiedNVD

All scores

snyk6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N/E:P
GitHub6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Classification

CWE-79

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

Go Vulnerability Database

Cross-site Scripting in github.com/greenpau/caddy-security

NVD (es)

Todas las versiones del paquete github.com/greenpau/caddy-security son vulnerables a Cross-site Scripting (XSS) a través del encabezado Referer, debido a una desinfección de entrada inadecuada. Aunque el encabezado Referer se desinfecta mediante el escape de algunos caracteres que pueden permitir XSS (por ejemplo, [&amp;], [&lt;], [&gt;], ["], [']), no tiene en cuenta el ataque basado en el esquema de URL de JavaScript (por ejemplo, javascript:alert(document.domain)// payload). Explotar esta vulnerabilidad puede no ser trivial, pero podría llevar a la ejecución de scripts maliciosos en el contexto del navegador del usuario objetivo, comprometiendo las sesiones del usuario.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-21496 changed 2024-11-06CVE Terms of Use
GitHub Advisory DatabaseGHSA-ff72-ff42-c3gw changed 2024-11-06CC-BY-4.0
Go Vulnerability DatabaseGO-2024-2559 changed 2026-03-03CC-BY-4.0
NVDCVE-2024-21496 changed 2026-06-17Public domain