Insecure Randomness Affecting github.com/greenpau/caddy-security package, versions <1.0.42


0.0
medium

Snyk CVSS

    Attack Complexity Low

    Threat Intelligence

    Exploit Maturity Proof of concept
    EPSS 0.05% (15th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-GOLANG-GITHUBCOMGREENPAUCADDYSECURITY-6248275
  • published 16 Feb 2024
  • disclosed 18 Sep 2023
  • credit Maciej Domanski, Travis Peters, David Pokora

How to fix?

Upgrade github.com/greenpau/caddy-security to version 1.0.42 or higher.

Overview

github.com/greenpau/caddy-security is a Security App and Plugin for Caddy v2.

Affected versions of this package 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.