NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
☕
☕ Maven
Not in CISA KEV
HIGH severity

CVE-2025-22228 — spring-security-crypto

HIGHFix: spring-projects/spring-security@46f0dc6

CVE-2025-22228 is a high-severity (CVSS 7.4) Improper Authentication vulnerability in org.springframework.security:spring-security-crypto. A fix is available for org.springframework.security:spring-security-crypto — see the affected versions and patch details below.

Spring Security Does Not Enforce Password Length

Published
Updated
Affected
7 pkgs
Patched
7 / 7
Exploits
None indexed
Exploitation data as of Nov 10, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • A successful exploit gives an attacker total control of the affected component, not partial access.
  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2025-22228.

EPSS Exploitation Probability

via FIRST.org ↗
0.6%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs50th percentile — riskier than 50% of all scored CVEsHighest risk
0.00%0.37%0.74%1.11%0.1%0.6%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

7 pkgs affected
☕org.springframework.security:spring-security-crypto☕org.springframework.security:spring-security-crypto☕org.springframework.security:spring-security-crypto☕org.springframework.security:spring-security-crypto☕org.springframework.security:spring-security-crypto☕org.springframework.security:spring-security-crypto☕org.springframework.security:spring-security-crypto

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.

Description

BCryptPasswordEncoder.matches(CharSequence,String) will incorrectly return true for passwords larger than 72 characters as long as the first 72 characters are the same.

Affected Packages

7 total 7 fixed
EcosystemPackageVulnerable rangeFix
☕Mavenorg.springframework.security:spring-security-crypto≥ 6.3.0&&< 6.3.86.3.8org.springframework.security:spring-security-crypto:6.3.8
☕Mavenorg.springframework.security:spring-security-crypto≥ 6.4.0&&< 6.4.46.4.4org.springframework.security:spring-security-crypto:6.4.4
☕Mavenorg.springframework.security:spring-security-crypto≥ 6.2.0&&< 6.2.106.2.10org.springframework.security:spring-security-crypto:6.2.10
☕Mavenorg.springframework.security:spring-security-crypto≥ 6.1.0&&< 6.1.146.1.14org.springframework.security:spring-security-crypto:6.1.14
☕Mavenorg.springframework.security:spring-security-crypto≥ 6.0.0&&< 6.0.166.0.16org.springframework.security:spring-security-crypto:6.0.16
☕Mavenorg.springframework.security:spring-security-crypto≥ 5.8.0&&< 5.8.185.8.18org.springframework.security:spring-security-crypto:5.8.18

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.springframework.security:spring-security-crypto, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update org.springframework.security:spring-security-crypto to 6.3.8 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2025-22228 is resolved across your whole dependency graph.

  3. Workarounds

    Put an independent control in front of the weakness: restrict the affected endpoint or interface to trusted networks, require an additional authentication factor or proxy-level check, and invalidate existing sessions and credentials in case the flaw has already been used.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatImportant
Workaround published by Red Hat
Red Hat Product Security does not have a recommended mitigation at this time.
Source: Red Hat security advisory for CVE-2025-22228 (CC BY 4.0)
ProductFixed inAdvisory
OCP-Tools-4.12-RHEL-8jenkins-0:2.504.2.1750932984-3.el8RHSA-2025:10118
OCP-Tools-4.13-RHEL-8jenkins-0:2.504.2.1750916374-3.el8RHSA-2025:10119
OCP-Tools-4.14-RHEL-8jenkins-0:2.504.2.1750903189-3.el8RHSA-2025:10120
OCP-Tools-4.15-RHEL-8jenkins-0:2.504.2.1750856366-3.el8RHSA-2025:10104
OCP-Tools-4.16-RHEL-9jenkins-0:2.504.2.1750857144-3.el9RHSA-2025:10098
OCP-Tools-4.17-RHEL-9jenkins-0:2.504.2.1750851690-3.el9RHSA-2025:10097
OCP-Tools-4.18-RHEL-9jenkins-0:2.504.2.1750846524-3.el9RHSA-2025:10092
Red Hat build of Apache Camel 4.8.5 for Spring Bootspring-security-coreRHSA-2025:3543

Frequently Asked Questions

BCryptPasswordEncoder.matches(CharSequence,String) will incorrectly return true for passwords larger than 72 characters as long as the first 72 characters are the same.
O3 Security · Impact-Aware SCA

Is CVE-2025-22228 in your dependencies?

Find it across Maven, including transitive dependencies.

CVE-2025-22228: spring-security-crypto — Fixed in 6.3.8