CVE-2024-21495
CRITICAL 9.8CVSS 3.1Use of Insufficiently Random Values in github.com/greenpau/caddy-security
Versions of the package github.com/greenpau/caddy-security before 1.0.42 are vulnerable to Insecure Randomness due to using an insecure random number generation library which could possibly be predicted via a brute-force search. Attackers could use the potentially predictable nonce value used for authentication purposes in the OAuth flow to conduct OAuth replay attacks. In addition, insecure randomness is used while generating multifactor authentication (MFA) secrets and creating API keys in the database package.
- Published
- 17 Feb 2024
- Last modified
- 17 Jun 2026
- Assigned by
- report@snyk.io
- NVD status
- Analyzed
- Weakness
- CWE-330
- Also known as
- GHSA-c7vf-m394-m4x4GO-2024-2565
- Sources
- NVDJSONOSV GHSA-c7vf-m394-m4x4JSONOSV GO-2024-2565JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | report@snyk.io (Secondary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | greenpau | caddy-securitycpe:2.3:a:greenpau:caddy-security:*:*:*:*:*:*:*:* |
< 1.0.42 | 1.0.42 |
| OSV | Go | github.com/greenpau/caddy-security | <= 1.0.42 | |
| OSV | Go | github.com/greenpau/caddy-security | all versions |
References
- https://blog.trailofbits.com/2023/09/18/security-flaws-in-an-sso-plugin-for-caddy/ · Third Party Advisory, WEB
- https://github.com/greenpau/caddy-security/issues/265 · Issue Tracking, WEB, REPORT
- https://github.com/greenpau/go-authcrunch/commit/ecd3725baf2683eb1519bb3c81ae41085fbf7dc2 · Patch, WEB
- https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMGREENPAUCADDYSECURITY-6248275 · Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-21495 · ADVISORY
- github.com/greenpau/caddy-security · PACKAGE
- https://github.com/advisories/GHSA-c7vf-m394-m4x4 · ADVISORY
History
- 25 Nov 2026 20:54 UTC · NVD: first stored (published 17 Feb 2024)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 28 Jun 2024)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 17 Feb 2024)