{"id":"CVE-2024-21496","aliases":["EUVD-2024-0628","GHSA-ff72-ff42-c3gw","GO-2024-2559"],"status":"published","title":"Cross-site Scripting in github.com/greenpau/caddy-security","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., [\u0026], [\u003c], [\u003e], [\"], [']), 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.","severity":{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N/E:P","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00576,"percentile":0.47944,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-79"],"published":"2024-02-17T05:00:02Z","modified":"2026-06-17T07:09:36Z","affected":[{"source":"ghsa","ecosystem":"Go","package":"github.com/greenpau/caddy-security","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"1.1.23"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/greenpau/caddy-security","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"1.1.23"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/greenpau/caddy-security","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}]}],"products":[{"vendor":"authcrunch","product":"caddy-security"}],"references":[{"url":"https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMGREENPAUCADDYSECURITY-6249860","tags":["x_transferred","Third Party Advisory","web"]},{"url":"https://github.com/greenpau/caddy-security/issues/267","tags":["x_transferred","Exploit","Issue Tracking","web","report"]},{"url":"https://blog.trailofbits.com/2023/09/18/security-flaws-in-an-sso-plugin-for-caddy/","tags":["x_transferred","Exploit","Third Party Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21496","tags":["advisory"]},{"url":"https://blog.trailofbits.com/2023/09/18/security-flaws-in-an-sso-plugin-for-caddy","tags":["web"]},{"url":"https://github.com/advisories/GHSA-ff72-ff42-c3gw","tags":["advisory"]},{"url":"github.com/greenpau/caddy-security","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2024-21496","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., [\u0026], [\u003c], [\u003e], [\"], [']), 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.","status":"published","published":"2024-02-17T05:00:02.407Z","modified":"2024-11-06T18:53:52.043Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N/E:P","level":"medium","assessor":"cna"}],"cwes":["CWE-79","CWE-79"],"updated_at":"2026-11-02T14:34:05.077718Z"}],"euvd":[{"id":"EUVD-2024-0628","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., [\u0026], [\u003c], [\u003e], [\"], [']), 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.","status":"published","published":"2024-02-17T05:00:02Z","modified":"2024-11-06T18:53:52Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N/E:P","level":"medium"}],"updated_at":"2026-11-03T00:05:09.226597Z"}],"ghsa":[{"id":"GHSA-ff72-ff42-c3gw","title":"Cross-site Scripting in github.com/greenpau/caddy-security","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., [\u0026], [\u003c], [\u003e], [\"], [']), 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.","status":"published","published":"2024-02-17T06:30:34Z","modified":"2026-03-20T05:03:07Z","cvss":[{"version":"4.0","score":5.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","level":"medium"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:39:38.524712Z"}],"nvd":[{"id":"CVE-2024-21496","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., [\u0026], [\u003c], [\u003e], [\"], [']), 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.","status":"published","published":"2024-02-17T05:15:09.603Z","modified":"2026-06-17T07:09:36.97Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:09:37.655131Z"}],"osv":[{"id":"GHSA-ff72-ff42-c3gw","title":"Cross-site Scripting in github.com/greenpau/caddy-security","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., [\u0026], [\u003c], [\u003e], [\"], [']), 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.","status":"published","published":"2024-02-17T06:30:34Z","modified":"2024-11-06T23:31:23Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"},{"version":"4.0","score":5.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:46.39441Z"},{"id":"GO-2024-2559","title":"Cross-site Scripting in github.com/greenpau/caddy-security","description":"Cross-site Scripting in github.com/greenpau/caddy-security","status":"published","published":"2024-06-28T15:28:53Z","modified":"2026-03-03T04:54:43.043803Z","updated_at":"2026-11-02T15:47:01.185262Z"}]}}
