{"answers":{"affected":"14 open source packages ship an affected version, including org.springframework.security:spring-security-crypto.","exploited":"There is no known exploitation of CVE-2025-22228 in the wild and no public exploit code.","fix":"Upgrade org.springframework.security:spring-security-crypto to a fixed version for your release line: 5.7.16, 5.8.18, 6.0.16 or 6.1.14.","what":"CVE-2025-22228 is a high-severity authentication bypass vulnerability in Spring Security, published on 20 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-22228 and fix it if it is affected.\n\nWhat it is: CVE-2025-22228 is a high-severity authentication bypass vulnerability in Spring Security, published on 20 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2025-22228 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- org.springframework.security:spring-security-crypto (Maven): affected all versions; fixed in 5.7.16\n- org.springframework.security:spring-security-crypto (Maven): affected all versions; fixed in 5.7.16\n- org.springframework.security:spring-security-crypto (Maven): affected from 5.8.0; fixed in 5.8.18\n- org.springframework.security:spring-security-crypto (Maven): affected from 5.8.0; fixed in 5.8.18\n- org.springframework.security:spring-security-crypto (Maven): affected from 6.0.0; fixed in 6.0.16\n- org.springframework.security:spring-security-crypto (Maven): affected from 6.0.0; fixed in 6.0.16\n- org.springframework.security:spring-security-crypto (Maven): affected from 6.1.0; fixed in 6.1.14\n- org.springframework.security:spring-security-crypto (Maven): affected from 6.1.0; fixed in 6.1.14\n- org.springframework.security:spring-security-crypto (Maven): affected from 6.2.0; fixed in 6.2.10\n- org.springframework.security:spring-security-crypto (Maven): affected from 6.2.0; fixed in 6.2.10\n- org.springframework.security:spring-security-crypto (Maven): affected from 6.3.0; fixed in 6.3.8\n- org.springframework.security:spring-security-crypto (Maven): affected from 6.3.0; fixed in 6.3.8\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-22228/ (Markdown: https://insights.sbomify.com/CVE-2025-22228/index.md)","id":"CVE-2025-22228","markdown":"https://insights.sbomify.com/CVE-2025-22228/index.md","name":"CVE-2025-22228","record":{"aliases":["CLEANSTART-2026-QB26194","CLSA-2025-1742947247","ECHO-0d82-8e9f-d92a","GHSA-mg83-c7gq-rv5c","MINI-5jfg-gm2f-5p33","MINI-6x3f-vp3m-79mf","MINI-m98r-gg6p-r796","MINI-wpmv-6xv7-c8fv","RHLW-2026-351d5430e078d751","ROOT-APP-MAVEN-CVE-2025-22228"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Spring Security library","requires_auth":"none","summary":"Attackers can bypass authentication by providing passwords that share the first 72 characters with the valid password, exploiting BCrypt's truncation behavior.","user_interaction":"not_required","vuln_class":"auth_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"vmware","cpe":[],"cvss":{"score":7.4,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-287","name":"Improper Authentication"}],"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.","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"CVE-2025-22228: Spring Security BCryptPasswordEncoder does not enforce maximum password length","id":"CVE-2025-22228","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"auth_bypass","year":"2025"},"n_packages":14,"n_references":1,"next":{"headline":"Authentication bypass vulnerability","id":"CVE-2025-22230"},"packages":[{"ecosystem":"Maven","fixed":["5.7.16"],"introduced":["0"],"last_affected":[],"package":"org.springframework.security:spring-security-crypto","purl":null,"source":"GHSA-mg83-c7gq-rv5c"},{"ecosystem":"Maven","fixed":["5.7.16"],"introduced":["0"],"last_affected":[],"package":"org.springframework.security:spring-security-crypto","purl":"pkg:maven/org.springframework.security/spring-security-crypto","source":"GHSA-mg83-c7gq-rv5c"},{"ecosystem":"Maven","fixed":["5.8.18"],"introduced":["5.8.0"],"last_affected":[],"package":"org.springframework.security:spring-security-crypto","purl":null,"source":"GHSA-mg83-c7gq-rv5c"},{"ecosystem":"Maven","fixed":["5.8.18"],"introduced":["5.8.0"],"last_affected":[],"package":"org.springframework.security:spring-security-crypto","purl":"pkg:maven/org.springframework.security/spring-security-crypto","source":"GHSA-mg83-c7gq-rv5c"},{"ecosystem":"Maven","fixed":["6.0.16"],"introduced":["6.0.0"],"last_affected":[],"package":"org.springframework.security:spring-security-crypto","purl":null,"source":"GHSA-mg83-c7gq-rv5c"},{"ecosystem":"Maven","fixed":["6.0.16"],"introduced":["6.0.0"],"last_affected":[],"package":"org.springframework.security:spring-security-crypto","purl":"pkg:maven/org.springframework.security/spring-security-crypto","source":"GHSA-mg83-c7gq-rv5c"},{"ecosystem":"Maven","fixed":["6.1.14"],"introduced":["6.1.0"],"last_affected":[],"package":"org.springframework.security:spring-security-crypto","purl":null,"source":"GHSA-mg83-c7gq-rv5c"},{"ecosystem":"Maven","fixed":["6.1.14"],"introduced":["6.1.0"],"last_affected":[],"package":"org.springframework.security:spring-security-crypto","purl":"pkg:maven/org.springframework.security/spring-security-crypto","source":"GHSA-mg83-c7gq-rv5c"},{"ecosystem":"Maven","fixed":["6.2.10"],"introduced":["6.2.0"],"last_affected":[],"package":"org.springframework.security:spring-security-crypto","purl":null,"source":"GHSA-mg83-c7gq-rv5c"},{"ecosystem":"Maven","fixed":["6.2.10"],"introduced":["6.2.0"],"last_affected":[],"package":"org.springframework.security:spring-security-crypto","purl":"pkg:maven/org.springframework.security/spring-security-crypto","source":"GHSA-mg83-c7gq-rv5c"},{"ecosystem":"Maven","fixed":["6.3.8"],"introduced":["6.3.0"],"last_affected":[],"package":"org.springframework.security:spring-security-crypto","purl":null,"source":"GHSA-mg83-c7gq-rv5c"},{"ecosystem":"Maven","fixed":["6.3.8"],"introduced":["6.3.0"],"last_affected":[],"package":"org.springframework.security:spring-security-crypto","purl":"pkg:maven/org.springframework.security/spring-security-crypto","source":"GHSA-mg83-c7gq-rv5c"},{"ecosystem":"Maven","fixed":["6.4.4"],"introduced":["6.4.0"],"last_affected":[],"package":"org.springframework.security:spring-security-crypto","purl":null,"source":"GHSA-mg83-c7gq-rv5c"},{"ecosystem":"Maven","fixed":["6.4.4"],"introduced":["6.4.0"],"last_affected":[],"package":"org.springframework.security:spring-security-crypto","purl":"pkg:maven/org.springframework.security/spring-security-crypto","source":"GHSA-mg83-c7gq-rv5c"}],"prev":{"headline":"CVE-2025-22227: Authentication Leak On Redirect With Reactor Netty HTTP Client","id":"CVE-2025-22227"},"products":["Spring Security"],"published":"2025-03-20","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-02-26","vendors":["Spring"]},"summary":"Attackers can bypass authentication by providing passwords that share the first 72 characters with the valid password, exploiting BCrypt's truncation behavior.","url":"https://insights.sbomify.com/CVE-2025-22228/"}