Your RSA-2048 keys break in 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
Mar 20, 2025
Updated
Sep 10, 2026
Affected
7 pkgs
Patched
7 / 7
Exploits
None indexed
Exploitation data as of Sep 24, 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 CVEs46th percentile — riskier than 46% of all scored CVEsHighest risk

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

How urgent is this, really

CVE-2025-22228 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.

Where this sits among everything scored

Of 378,567 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.

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

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2025-22228 can be triaged on real exposure rather than presence alone.

Tailored to CVE-2025-22228. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

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
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?

O3 Security finds CVE-2025-22228 across Maven dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

CVE-2025-22228: spring-security (High 7.4) | O3 Security