Integer Overflow or Wraparound Affecting bcrypt package, versions <3.1.22


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.02% (6th 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 Learn

Learn about Integer Overflow or Wraparound vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUBY-BCRYPT-15700501
  • published20 Mar 2026
  • disclosed19 Mar 2026
  • creditUnknown

Introduced: 19 Mar 2026

NewCVE-2026-33306  (opens in a new tab)
CWE-190  (opens in a new tab)

How to fix?

Upgrade bcrypt to version 3.1.22 or higher.

Overview

Affected versions of this package are vulnerable to Integer Overflow or Wraparound in the BCrypt.java implementation when the cost parameter is set to 31. An attacker can significantly reduce the computational effort required to brute-force password hashes by supplying or verifying hashes with a cost of 31, resulting in zero key-strengthening iterations.

Note:

This is only exploitable if the cost parameter is set to 31 or when verifying a hash with the $2a$31$ prefix.

CVSS Base Scores

version 4.0
version 3.1