{"cve":"CVE-2024-21495","nvd":{"published":"2024-02-17T05:15:09.343","modified":"2026-06-17T07:09:36.837","status":"Analyzed","description":"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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8},"cwes":["CWE-330"],"references":["https://blog.trailofbits.com/2023/09/18/security-flaws-in-an-sso-plugin-for-caddy/","https://github.com/greenpau/caddy-security/issues/265","https://github.com/greenpau/go-authcrunch/commit/ecd3725baf2683eb1519bb3c81ae41085fbf7dc2","https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMGREENPAUCADDYSECURITY-6248275","https://blog.trailofbits.com/2023/09/18/security-flaws-in-an-sso-plugin-for-caddy/"],"products":["greenpau:caddy-security"],"source":"nvd","synced_at":"2026-10-19T21:45:59.823092188+00:00"},"epss":{"cve":"CVE-2024-21495","score":0.0068,"percentile":0.52401,"date":"2026-11-01"},"kev":null,"osv":[{"id":"GHSA-c7vf-m394-m4x4","url":"https://osv.dev/vulnerability/GHSA-c7vf-m394-m4x4","summary":"Use of Insufficiently Random Values in github.com/greenpau/caddy-security","modified":"2024-06-28T15:58:35.038291Z","packages":[{"ecosystem":"Go","name":"github.com/greenpau/caddy-security","purl":"pkg:golang/github.com/greenpau/caddy-security","ranges":["<=1.0.42"],"fixed":[]}]},{"id":"GO-2024-2565","url":"https://osv.dev/vulnerability/GO-2024-2565","summary":"Use of Insufficiently Random Values in github.com/greenpau/caddy-security","modified":"2026-03-03T04:54:44.672300Z","packages":[{"ecosystem":"Go","name":"github.com/greenpau/caddy-security","purl":"pkg:golang/github.com/greenpau/caddy-security","ranges":["all versions"],"fixed":[]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}