Skip to main content
No exploitation reportedFix available

CVE-2025-22228

No exploitation reported by the sources we read.

  • Published2025-03-20
  • Fixed in6.4.4 · 6.3.8 · 6.2.10 · 6.1.14 · 6.0.16 · 5.8.18
  • WeaknessCWE-287

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2025-03-2006:15CVE publishedNVD

Versions per branch

OSV
spring-security-crypto
BranchAffectedFixed in
6.4≥ 6.4.0, < 6.4.46.4.4
6.3≥ 6.3.0, < 6.3.86.3.8
6.2≥ 6.2.0, < 6.2.106.2.10
6.1≥ 6.1.0, < 6.1.146.1.14
6.0≥ 6.0.0, < 6.0.166.0.16
5.8≥ 5.8.0, < 5.8.185.8.18
5.7< 5.7.165.7.16

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As vmware, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • Spring Securityother versions: affected
    Affected
    • ≥ 5.7.x, < 5.7.16fixed in 5.7.16Enterprise Support Only
    • ≥ 5.8.x, < 5.8.18fixed in 5.8.18Enterprise Support Only
    • ≥ 6.0.x, < 6.0.16fixed in 6.0.16Enterprise Support Only
    • ≥ 6.1.x, < 6.1.14fixed in 6.1.14Enterprise Support Only
    • ≥ 6.2.x, < 6.2.10fixed in 6.2.10Enterprise Support Only
    • ≥ 6.3.x, < 6.3.8fixed in 6.3.8OSS
    • ≥ 6.4.x, < 6.4.4fixed in 6.4.4OSS

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE terms of useCVE recordupdated 2025-03-20

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • camunda-zeebe-8.6Chainguardall versions · fixed in 8.6.12-r1and 1 other package
  • io.root.org.springframework.security:spring-security-cryptoRoot:Mavenall versions · fixed in 6.1.3-root.io.1
  • io.root.org.springframework.security:spring-security-cryptoRoot:Mavenall versions · fixed in 5.7.1-root.io.2
  • io.root.org.springframework.security:spring-security-cryptoRoot:Mavenall versions · fixed in 5.7.5-root.io.1
  • io.root.org.springframework.security:spring-security-cryptoRoot:Mavenall versions · fixed in 6.1.3-root.io.2
  • io.root.org.springframework.security:spring-security-cryptoRoot:Mavenall versions · fixed in 6.1.3-root.io.3
  • io.root.org.springframework.security:spring-security-cryptoRoot:Mavenall versions · fixed in 6.1.3-root.io.4
  • io.root.org.springframework.security:spring-security-cryptoRoot:Mavenall versions · fixed in 6.1.3-root.io.5

85 more package ranges on OSV.dev

Vendor advisories

  • CVE-2025-22228 Red Hat Product Security29 products fixed · 7 known affected

    spring-security-core: Spring Security BCryptPasswordEncoder does not enforce maximum password length

    spring-security-core as a component of A-MQ Clients 2 · spring-security-core as a component of Red Hat Data Grid 8 · org.apache.servicemix.bundles.spring-security-core as a component of Red Hat Fuse 7 · +4 more

  • RHSA-2025:10120 Red Hat Product Security4 products fixed

    Red Hat Security Advisory: Red Hat Product OCP Tools 4.14 OpenShift Jenkins security update

  • RHSA-2025:10118 Red Hat Product Security4 products fixed

    Red Hat Security Advisory: Red Hat Product OCP Tools 4.12 OpenShift Jenkins security update

  • RHSA-2025:10119 Red Hat Product Security4 products fixed

    Red Hat Security Advisory: Red Hat Product OCP Tools 4.13 OpenShift Jenkins security update

  • RHSA-2025:10104 Red Hat Product Security4 products fixed

    Red Hat Security Advisory: Red Hat Product OCP Tools 4.15 OpenShift Jenkins security update

  • RHSA-2025:10098 Red Hat Product Security4 products fixed

    Red Hat Security Advisory: Red Hat Product OCP Tools 4.16 OpenShift Jenkins security update

3 more advisories

Full record on NVD

Fix

  1. Update spring-security-crypto to 6.4.4 · 6.3.8 · 6.2.10 · 6.1.14 · 6.0.16 · 5.8.18 · 5.7.16
  2. Vendor fix Red Hat Product Security RHSA-2025:10120 · 4 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
  3. Vendor fix Red Hat Product Security RHSA-2025:3543 · 1 productBefore applying this update, make sure all previously released errata relevant to your system have been applied. For details on how to apply this update, refer to: https://access.redhat.com/articles/11258
  4. Workaround from the vendor Red Hat Product Security RHSA-2025:10120 · 4 productsRed Hat Product Security does not have a recommended mitigation at this time.
  5. No fix planned, says the vendor Red Hat Product Security CVE-2025-22228 · 1 productOut of support scope

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Published
2025-03-20
Last modified
2026-06-17
NVD status
Deferred
GitHub advisory
GHSA-mg83-c7gq-rv5c

Frequently asked questions

What is CVE-2025-22228?

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

Is CVE-2025-22228 actively exploited?

Active exploitation of CVE-2025-22228 has not been confirmed. Its EPSS score was 0.6% on 2026-12-04, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2025-22228?

CVE-2025-22228 has a CVSS v3 base score of 7.4 (High severity), with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N.

Running spring-security-core? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record