CVE-2025-22228Network attack vector

Authentication bypass via BCrypt password truncation

Published Mar 20, 2025 · Updated Feb 26, 2026

Authentication bypass in Spring Security 6.4.3 and earlier allows remote attackers to access accounts via crafted long passwords. BCryptPasswordEncoder.matches(CharSequence,String) passes supplied UTF-8 password bytes to BCrypt without rejecting input over 72 bytes, so BCrypt ignores the suffix and compares only the first 72 bytes. The target account must use a password over 72 bytes, and remote attackers must know its first 72 bytes to authenticate as that account.

CVSS severity7.4
High
EPSS probability0.59%
Next 30 days · Sep 16, 2026
Known exploitationUnconfirmed
Based on sourced intelligence
Hinoki checkNot available
Coverage for this vulnerability

See if you're affected

Explore vulnerability checks for your environment with Hinoki.

Book a demo

Summary

What happened

Authentication bypass in Spring Security 6.4.3 and earlier allows remote attackers to access accounts via crafted long passwords. BCryptPasswordEncoder.matches(CharSequence,String) passes supplied UTF-8 password bytes to BCrypt without rejecting input over 72 bytes, so BCrypt ignores the suffix and compares only the first 72 bytes. The target account must use a password over 72 bytes, and remote attackers must know its first 72 bytes to authenticate as that account.

The record

CVE
CVE-2025-22228
Published
Mar 20, 2025
Updated
Feb 26, 2026
Vendor
Spring
Product
Spring Security
Classifications
CWE-521, CWE-287, T1078
Attack vector
network
Privileges
unauthenticated

Timeline

How it unfolded

  1. Mar 20, 2025CVE publishedPublication date reported by the CVE source.
  2. Feb 26, 2026Record updatedLatest update available in the CVE record.

Exploitability

Present is not the same as exploitable

Compare your product and version with the public record. A matching version still requires validation against your environment.

Is a vulnerable build present?

Compare these published version ranges with your installed build and any vendor patches.

  1. Affected versionversion=5.7.x <5.7.16
  2. Affected versionversion=5.8.x <5.8.18
  3. Affected versionversion=6.0.x <6.0.16
  4. Affected versionversion=6.1.x <6.1.14
  5. Affected versionversion=6.2.x <6.2.10
  6. Affected versionversion=6.3.x <6.3.8
  7. Affected versionversion=6.4.x <6.4.4

What conditions does exploitation require?

Attack vectornetwork
Required privilegesunauthenticated

What is affected?

Spring · Spring Securityversion=5.7.x <5.7.16; version=5.8.x <5.8.18; version=6.0.x <6.0.16; version=6.1.x <6.1.14; version=6.2.x <6.2.10; version=6.3.x <6.3.8; version=6.4.x <6.4.4

Published CVSS scores

7.4GitHub Advisory DatabaseCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N

CVSS describes severity. EPSS estimates exploitation probability.

Attacks

What attackers are doing with it

Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.

Daily unique IPsNo honeypot observations are available for this CVE in the selected window.

No observations available

Sep 10, 2026Sep 16, 2026
Latest reporting daySep 16, 2026
Latest daily unique IPsUnavailable
Prior 30-day averageUnavailable
SourceShadowserver honeypots (KEV)
Vectornetwork
Privilegesunauthenticated
Known exploitationUnconfirmed
Public exploitUnconfirmed

Weakness, pattern, technique

CWE-521Weak Password Requirements
CWE-287Improper Authentication
T1078Valid Accounts

Public exploit references

No public exploit references are available in this record.

Labels summarize the accepted research assessment. They do not indicate a test against your environment.

Technologies

Your stack

See the directory against your own environment.

Your stack

Check the software in your environment

Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.

Book a demo