{"id":"CVE-2025-22228","aliases":["CVE-2025-22228","GHSA-mg83-c7gq-rv5c"],"related":[],"kind":"vulnerability","state":"published","title":"CVE-2025-22228: Spring Security BCryptPasswordEncoder does not enforce maximum password length","summary":"BCryptPasswordEncoder.matches(CharSequence,String) will incorrectly return true for passwords larger than 72 characters as long as the first 72 characters are the same.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"BCryptPasswordEncoder.matches(CharSequence,String) will incorrectly return true for passwords larger than 72 characters as long as the first 72 characters are the same.","source":"cvelist"},{"lang":"es","text":"BCryptPasswordEncoder.matches(CharSequence,String) devolverá incorrectamente verdadero para contraseñas con más de 72 caracteres siempre que los primeros 72 caracteres sean iguales.","source":"nvd"}],"published":"2025-03-20T05:49:19.275Z","modified":"2026-09-10T03:49:48.718Z","severity":{"scorer":"vmware","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","score":7.4,"rating":"HIGH"},"severities":[{"scorer":"vmware","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","score":7.4,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","score":7.4,"rating":"HIGH"}],"cwes":["CWE-287","CWE-521"],"affected":[{"ranges":[{"type":"Enterprise Support Only","introduced":"5.7.x","fixed":"5.7.16","status":"affected"},{"type":"Enterprise Support Only","introduced":"5.8.x","fixed":"5.8.18","status":"affected"},{"type":"Enterprise Support Only","introduced":"6.0.x","fixed":"6.0.16","status":"affected"},{"type":"Enterprise Support Only","introduced":"6.1.x","fixed":"6.1.14","status":"affected"},{"type":"Enterprise Support Only","introduced":"6.2.x","fixed":"6.2.10","status":"affected"},{"type":"OSS","introduced":"6.3.x","fixed":"6.3.8","status":"affected"},{"type":"OSS","introduced":"6.4.x","fixed":"6.4.4","status":"affected"}],"vendor":"Spring","product":"Spring Security","package":"Spring Security","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"6.3.0","status":"affected","fixed":"6.3.8"}],"ecosystem":"Maven","package":"org.springframework.security:spring-security-crypto","purl":"pkg:maven/org.springframework.security/spring-security-crypto","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.4.0","status":"affected","fixed":"6.4.4"}],"ecosystem":"Maven","package":"org.springframework.security:spring-security-crypto","purl":"pkg:maven/org.springframework.security/spring-security-crypto","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.2.0","status":"affected","fixed":"6.2.10"}],"ecosystem":"Maven","package":"org.springframework.security:spring-security-crypto","purl":"pkg:maven/org.springframework.security/spring-security-crypto","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.1.0","status":"affected","fixed":"6.1.14"}],"ecosystem":"Maven","package":"org.springframework.security:spring-security-crypto","purl":"pkg:maven/org.springframework.security/spring-security-crypto","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.0.0","status":"affected","fixed":"6.0.16"}],"ecosystem":"Maven","package":"org.springframework.security:spring-security-crypto","purl":"pkg:maven/org.springframework.security/spring-security-crypto","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"5.8.0","status":"affected","fixed":"5.8.18"}],"ecosystem":"Maven","package":"org.springframework.security:spring-security-crypto","purl":"pkg:maven/org.springframework.security/spring-security-crypto","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.7.16"}],"ecosystem":"Maven","package":"org.springframework.security:spring-security-crypto","purl":"pkg:maven/org.springframework.security/spring-security-crypto","source":"ghsa"}],"references":[{"url":"https://spring.io/security/cve-2025-22228","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://security.netapp.com/advisory/ntap-20250425-0009/","tags":[],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-22228","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/spring-projects/spring-security/commit/46f0dc6dfc8402cd556c598fdf2d31f9d46cdbf3","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/spring-projects/spring-security","tags":["package"],"sources":["ghsa"]},{"url":"https://security.netapp.com/advisory/ntap-20250425-0009","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"vmware","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2025-03-21T03:55:17.357Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-22228","url":"https://www.cve.org/CVERecord?id=CVE-2025-22228","licence":"CVE Terms of Use","modified":"2026-02-26T19:09:20.934Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mg83-c7gq-rv5c","url":"https://github.com/advisories/GHSA-mg83-c7gq-rv5c","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:48.718Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-22228","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-22228","licence":"Public domain","modified":"2026-06-17T08:45:45.500Z"}],"updatedAt":"2026-11-25T22:58:55.370Z","epss":{"score":0.0061,"percentile":0.50574,"date":"2026-12-01T12:00:22.000Z"}}