Insecure Randomness Affecting bcryptify package, versions [,1.1.2)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

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 Learn

Learn about Insecure Randomness vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-BCRYPTIFY-12671194
  • published15 Sept 2025
  • disclosed10 Jul 2025
  • creditUnknown

Introduced: 10 Jul 2025

CVE NOT AVAILABLE CWE-330  (opens in a new tab)

How to fix?

Upgrade bcryptify to version 1.1.2 or higher.

Overview

bcryptify is a Bcryptify is a modern and elegant Python library designed to simplify the use of cryptographic algorithms, while adhering to SOLID principles to ensure clean, extensible, and maintainable code.

Affected versions of this package are vulnerable to Insecure Randomness via the encrypt function in the aes_gcm.py file, which fails to generate unique nonces for each encryption operation. An attacker can recover authentication keys, forge messages, and potentially decrypt all encrypted data by exploiting the mathematical properties of the reused nonce-key pairs.

References

CVSS Base Scores

version 4.0
version 3.1