
Cloud Vulnerability DB
A community-led vulnerabilities database
All versions of the package github.com/greenpau/caddy-security are vulnerable to Authentication Bypass by Spoofing via the X-Forwarded-For header due to improper input sanitization. The vulnerability was discovered and disclosed on September 18, 2023, and was assigned CVE-2024-21494. This security flaw affects the user identity module (/whoami API endpoint) of the caddy-security plugin, which is a middleware plugin for the Caddy web server (Trail of Bits Blog, Snyk).
The vulnerability stems from improper input sanitization of the X-Forwarded-For header in the user identity module. The CVSS v3.1 base score is 5.4 (Medium), with the following vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N. The vulnerability is classified as CWE-290 (Authentication Bypass by Spoofing) and allows attackers to manipulate the X-Forwarded-For header to spoof their IP address (Snyk).
If exploited, this vulnerability could lead to unauthorized access if the system trusts the spoofed IP address. The impact includes potential compromise of system security through IP address spoofing, which could allow attackers to bypass authentication mechanisms and gain unauthorized access to protected resources (Trail of Bits Blog).
To mitigate this vulnerability, it is recommended to reimplement the application to not rely on user-provided headers when obtaining a user's IP address. If user-provided headers are required (e.g., X-Forwarded-For for logging purposes), ensure the header is properly validated through regular expression checks for IP address format and sanitized to prevent CRLF log injection attacks (Trail of Bits Blog).
The vulnerability was initially reported to the caddy-security plugin maintainers on August 7, 2023. On August 23, 2023, the maintainers confirmed that there were no near-term plans to act on the reported vulnerabilities. The issue was publicly disclosed on September 18, 2023, as part of a larger security audit that revealed multiple vulnerabilities in the plugin (Trail of Bits Blog).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."