CVE-2024-21495
JSON

6.5medium

Use of Insufficiently Random Values in github.com/greenpau/caddy-security

Severity
6.5medium CVSS:3.1 by snyk
Exploit likelihood
0.68% (higher than 53% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
snyk
Also known as
GHSA-c7vf-m394-m4x4GO-2024-2565

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.

Affected

Product or packageVersionsReported by
github.com/greenpau/caddy-securitybefore 1.0.42CVE List
authcrunch caddy_securitybefore 1.0.42CVE List
github.com/greenpau/caddy-security (Go)up to 1.0.42, all versionsGitHub Advisory Database, Go Vulnerability Database
greenpau caddy-securitybefore 1.0.42NVD

All scores

snyk6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N/E:P
GitHub6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-330

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.

What each source says

CVE List

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.

Go Vulnerability Database

Use of Insufficiently Random Values in github.com/greenpau/caddy-security

NVD (es)

Las versiones del paquete github.com/greenpau/caddy-security anteriores a la 1.0.42 son vulnerables a la aleatoriedad insegura debido al uso de una librería de generación de números aleatorios insegura que posiblemente podría predecirse mediante una búsqueda de fuerza bruta. Los atacantes podrían utilizar el valor nonce potencialmente predecible utilizado con fines de autenticación en el flujo de OAuth para realizar ataques de reproducción de OAuth. Además, se utiliza aleatoriedad insegura al generar secretos de autenticación multifactor (MFA) y crear claves API en el paquete de base de datos.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-21495 changed 2024-09-05CVE Terms of Use
GitHub Advisory DatabaseGHSA-c7vf-m394-m4x4 changed 2024-06-28CC-BY-4.0
Go Vulnerability DatabaseGO-2024-2565 changed 2026-03-03CC-BY-4.0
NVDCVE-2024-21495 changed 2026-06-17Public domain