Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2024-21495

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-21495
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 02:22 UTC · Revision 1

Source evidence

CVE-2024-21495

core-osv · Original source

Published 17 Feb 2024, 05:00 UTC

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.

osv:CVE-2024-21495
Complete source record
{
  "id": "84a66912c6b988f810038cc0c8b698563e1529ba37805a9a8414189fddf77b52",
  "url": "https://osv.dev/vulnerability/CVE-2024-21495",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2024-21495",
    "summary": "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.",
    "evidence": "osv:CVE-2024-21495",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2024-21495",
      "aliases": [
        "CVE-2024-21495",
        "GHSA-c7vf-m394-m4x4",
        "GO-2024-2565"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N/E:P"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/greenpau/go-authcrunch",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1a3b8902f3bb3f4b8c53bf94a6ed89fd9a05301b"
                },
                {
                  "fixed": "ecd3725baf2683eb1519bb3c81ae41085fbf7dc2"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:greenpau:caddy-security:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.0.42"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "ecd3725baf2683eb1519bb3c81ae41085fbf7dc2"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.0.41",
            "v1.0.40",
            "v1.0.39",
            "v1.0.38",
            "v1.0.37",
            "v1.0.36",
            "v1.0.35",
            "v1.0.34",
            "v1.0.33",
            "v1.0.32",
            "v1.0.31",
            "v1.0.30",
            "v1.0.29",
            "v1.0.28",
            "v1.0.27",
            "v1.0.25",
            "v1.0.24",
            "v1.0.23",
            "v1.0.22",
            "v1.0.21",
            "v1.0.20",
            "v1.0.19",
            "v1.0.18",
            "v1.0.17",
            "v1.0.16",
            "v1.0.15",
            "v1.0.14",
            "v1.0.13",
            "v1.0.12",
            "v1.0.11",
            "v1.0.10",
            "v1.0.9",
            "v1.0.8",
            "v1.0.7",
            "v1.0.6",
            "v1.0.5"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-21495.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:25.429337877Z",
      "provider": "osv",
      "references": [
        "https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMGREENPAUCADDYSECURITY-6248275",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21495.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-21495",
        "https://github.com/greenpau/caddy-security/issues/265",
        "https://github.com/greenpau/go-authcrunch/commit/ecd3725baf2683eb1519bb3c81ae41085fbf7dc2",
        "https://blog.trailofbits.com/2023/09/18/security-flaws-in-an-sso-plugin-for-caddy/"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-330"
        ],
        "cna_assigner": "snyk",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21495.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-21495",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 491861,
  "published_at": "2024-02-17T05:00:08.241+00:00"
}