# CVE-2024-21495: Use of Insufficiently Random Values in github.com/greenpau/caddy-security

- Severity: Medium 6.5 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.68%, higher than 53% of CVEs (2026-12-01)
- Published: 2024-02-17T05:00:08.241Z
- Modified: 2026-06-17T07:09:36.837Z
- Also known as: GHSA-c7vf-m394-m4x4, GO-2024-2565
- Weaknesses: CWE-330
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: snyk

## 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.

(As written by CVE List.)

## Affected

- github.com/greenpau/caddy-security: before 1.0.42
- authcrunch caddy_security: before 1.0.42
- github.com/greenpau/caddy-security (Go): up to 1.0.42; all versions
- greenpau caddy-security: before 1.0.42

## Every score

- snyk: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N/E:P`
- GitHub: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMGREENPAUCADDYSECURITY-6248275> (third-party-advisory, web)
- <https://github.com/greenpau/go-authcrunch/commit/ecd3725baf2683eb1519bb3c81ae41085fbf7dc2> (patch, web)
- <https://blog.trailofbits.com/2023/09/18/security-flaws-in-an-sso-plugin-for-caddy/> (third-party-advisory)
- <https://github.com/greenpau/caddy-security/issues/265> (issue-tracking, report, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-21495> (advisory)
- <https://blog.trailofbits.com/2023/09/18/security-flaws-in-an-sso-plugin-for-caddy> (web)
- <https://github.com/advisories/GHSA-c7vf-m394-m4x4> (advisory)

## Sources

- CVE List: [CVE-2024-21495](https://www.cve.org/CVERecord?id=CVE-2024-21495), CVE Terms of Use, modified 2024-09-05
- GitHub Advisory Database: [GHSA-c7vf-m394-m4x4](https://github.com/advisories/GHSA-c7vf-m394-m4x4), CC-BY-4.0, modified 2024-06-28
- Go Vulnerability Database: [GO-2024-2565](https://pkg.go.dev/vuln/GO-2024-2565), CC-BY-4.0, modified 2026-03-03
- NVD: [CVE-2024-21495](https://nvd.nist.gov/vuln/detail/CVE-2024-21495), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-21495 · Whole record: https://cve.day/CVE-2024-21495.json · Rebuilt by cve.day 2026-11-25T22:58:36.886Z
