
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2024-21495 affects versions of github.com/greenpau/caddy-security before 1.0.42. The vulnerability was discovered by Trail of Bits researchers and disclosed on September 18, 2023. The issue exists in the caddy-security plugin, which is a security plugin for the Caddy web server that provides various authentication and authorization functionalities (Trail of Bits Blog).
The vulnerability stems from the use of the math/rand Golang library with a seed based on the Unix timestamp to generate strings for three security-critical contexts in the application. The affected components include the OAuth flow authentication, multifactor authentication (MFA) secrets generation, and API key creation in the database package. The CVSS v3.1 base score is 9.8 CRITICAL (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) according to NVD, while Snyk rates it as 6.5 MEDIUM (NVD).
The insecure randomness could allow attackers to predict generated values through brute-force search. This predictability could lead to OAuth replay attacks by exploiting predictable nonce values used for authentication. Additionally, the vulnerability affects the security of MFA secrets and API keys, potentially compromising the overall authentication system (Trail of Bits Blog).
The vulnerability has been patched in version 1.0.42 and later. The fix involves replacing the insecure math/rand library with Go's crypto/rand library for secure random number generation. The patch was implemented through a commit that addresses the insecure randomness finding (GitHub Commit).
The vulnerability was initially reported by Trail of Bits researchers who conducted a security assessment of the caddy-security plugin. The findings were publicly disclosed in a detailed blog post that outlined multiple security vulnerabilities in the plugin, with this being one of the high-severity issues identified (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."