Cross-site Scripting (XSS) Affecting github.com/greenpau/caddy-security package, versions *


0.0
medium

Snyk CVSS

    Attack Complexity Low
    User Interaction Required
    Scope Changed

    Threat Intelligence

    Exploit Maturity Proof of concept
    EPSS 0.05% (15th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-GOLANG-GITHUBCOMGREENPAUCADDYSECURITY-6249860
  • published 16 Feb 2024
  • disclosed 18 Sep 2023
  • credit Maciej Domanski, Travis Peters, David Pokora

How to fix?

There is no fixed version for github.com/greenpau/caddy-security.

Overview

github.com/greenpau/caddy-security is a Security App and Plugin for Caddy v2.

Affected versions of this package 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.

References