{"id":3528,"date":"2025-04-25T10:04:16","date_gmt":"2025-04-25T10:04:16","guid":{"rendered":"https:\/\/serisec.com\/index.php\/2025\/04\/25\/spring-security-vulnerability-let-attackers-determine-which-usernames-are-valid\/"},"modified":"2025-04-25T10:04:16","modified_gmt":"2025-04-25T10:04:16","slug":"spring-security-vulnerability-let-attackers-determine-which-usernames-are-valid","status":"publish","type":"post","link":"https:\/\/serisec.com\/index.php\/2025\/04\/25\/spring-security-vulnerability-let-attackers-determine-which-usernames-are-valid\/","title":{"rendered":"Spring Security Vulnerability Let Attackers Determine Which Usernames are Valid"},"content":{"rendered":"<p>    Spring Security Vulnerability Let Attackers Determine Which Usernames are Valid<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n    <!-- no image --><br \/>\n \t<BR><br \/>\n<BR><\/BR><\/p>\n<div>\n<p>A serious vulnerability related to information exposure (CVE-2025-22234) impacts several versions of the spring-security-crypto package.<\/p>\n<p>The flaw enables attackers to determine valid usernames through timing attacks, undermining a <a href=\"https:\/\/cybersecuritynews.com\/penetration-testing-and-threat-hunting-key-practices-for-security-leaders\/\" target=\"_blank\" rel=\"noreferrer noopener\">key security<\/a> feature designed to prevent user enumeration.\u00a0<\/p>\n<p>The vulnerability affects Spring Security versions 5.7.16, 5.8.18, 6.0.16, 6.1.14, 6.2.10, 6.3.8, and 6.4.4. Patches <a href=\"https:\/\/www.herodevs.com\/vulnerability-directory\/cve-2025-22234\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">are now available<\/a> through HeroDevs\u2019 Never-Ending Support (NES) version.<\/p>\n<p>Spring Security, a comprehensive Java security framework widely used in enterprise applications, typically implements timing attack mitigation by performing password checks regardless of whether a username exists.\u00a0<\/p>\n<h2 class=\"wp-block-heading\"><strong>Spring Security Timing Attack Exposes Usernames<\/strong><\/h2>\n<p>This prevents attackers from determining valid usernames by measuring response times during login attempts.<\/p>\n<p>\u201cThe irony is that this vulnerability was introduced while fixing another security issue,\u201d said Adrian Chapman, senior security researcher at CyberSafe Analytics.\u00a0<\/p>\n<p>\u201cThe patch for CVE-2025-22228 inadvertently broke the timing attack mitigation implemented in DaoAuthenticationProvider.\u201d<\/p>\n<p>The technical root cause involves <a href=\"https:\/\/cybersecuritynews.com\/trox-stealer-exfiltrate-sensitive-data\/\" target=\"_blank\" rel=\"noreferrer noopener\">BCrypt<\/a> password encoding with long passwords. When the password encoder is set to BCrypt and a password exceeding 72 characters is submitted, the encoder now throws an exception instead of following the previous behavior. This change allows attackers to measure differences in response times.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXdZAhCVdjziC5eL6Iws0JsUUrM_0kWzgbsky_uXnoXEhAimY1ZIugZrWmD7kAhG6fWzjZ8SvQyF8E9HAhDHU9nhlFKSaKYZP1Bvbf4zDdwhFmWTH99F0QPOa0VJy2CHDxi8qcXOcw?key=LwrMLumuzi9Gadstgwrl7eg4\" alt=\"\"><\/figure>\n<\/div>\n<p>Through careful measurement of response times, attackers can determine which usernames exist in the system.\u00a0<\/p>\n<p>Valid usernames typically result in longer processing times due to legitimate password checks, while invalid usernames return faster responses.<\/p>\n<p>Once valid usernames are identified, attackers can focus their password guessing or <a href=\"https:\/\/cybersecuritynews.com\/tag\/social-engineering\/\" target=\"_blank\" rel=\"noreferrer noopener\">social engineering<\/a> efforts on known accounts.<\/p>\n<p>The vulnerability, rated as Medium severity, was discovered by Jonas Robl from SAP and published on April 22, 2025.\u00a0<\/p>\n<figure class=\"wp-block-table is-style-stripes\">\n<table class=\"has-fixed-layout\">\n<tbody>\n<tr>\n<td><strong>Risk Factors<\/strong><\/td>\n<td><strong>Details<\/strong><\/td>\n<\/tr>\n<tr>\n<td>Affected Products<\/td>\n<td>Spring Security: 5.7.16, 5.8.18, 6.0.16, 6.1.14, 6.2.10, 6.3.8, 6.4.4<\/td>\n<\/tr>\n<tr>\n<td>Impact<\/td>\n<td>Information Exposure<\/td>\n<\/tr>\n<tr>\n<td>Exploit Prerequisites<\/td>\n<td>Attacker must be able to send authentication requests and measure response times; application must use affected Spring Security version with BCryptPasswordEncoder and DaoAuthenticationProvider<\/td>\n<\/tr>\n<tr>\n<td>CVSS 3.1 Score<\/td>\n<td>6.5 (Medium)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<h2 class=\"wp-block-heading\"><strong>Mitigation Steps<\/strong><\/h2>\n<p>Organizations using affected Spring Security versions should immediately implement one of the following mitigations:<\/p>\n<ul class=\"wp-block-list\">\n<li>Upgrade to supported versions of Spring Security that contain the fix.<\/li>\n<li>Leverage commercial support through HeroDevs for post-EOL security support.<\/li>\n<\/ul>\n<p>The vulnerability has been addressed by reverting to the previous behavior that ensured consistent timing regardless of username validity.<\/p>\n<p>The fix is available in NES for Spring Security v5.7.18 and v5.8.21, re-establishing the critical timing attack mitigation that maintains <a href=\"https:\/\/cybersecuritynews.com\/two-factor-authentication\/\" target=\"_blank\" rel=\"noreferrer noopener\">authentication security<\/a> integrity.<\/p>\n<p>As the security landscape changes, maintaining vigilance and promptly addressing vulnerabilities like CVE-2025-22234 is crucial for safeguarding sensitive user information and preserving trust in enterprise applications.<\/p>\n<p class=\"has-text-align-center has-background\" style=\"background:linear-gradient(180deg,rgb(238,238,238) 90%,rgb(169,184,195) 100%)\"><strong>Are you from the SOC and DFIR Teams? \u2013 Analyse Malware Incidents &amp; get live Access with ANY.RUN -&gt;\u00a0<a href=\"https:\/\/any.run\/demo?utm_source=csn_apr&amp;utm_medium=article&amp;utm_campaign=how-script-based-malware-attacks-work&amp;utm_content=demo&amp;utm_term=230425\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Start Now for Free<\/a>.<\/strong><\/p>\n<p>The post <a href=\"https:\/\/cybersecuritynews.com\/spring-security-vulnerability-let-attackers\/\">Spring Security Vulnerability Let Attackers Determine Which Usernames are Valid<\/a> appeared first on <a href=\"https:\/\/cybersecuritynews.com\/\">Cyber Security News<\/a>.<\/p>\n<\/div>\n<p> \t<BR><br \/>\n <BR><\/BR><br \/>\n    Kaaviya<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n<a href=\"https:\/\/cybersecuritynews.com\/spring-security-vulnerability-let-attackers\/\">Go to cyber-security-news<\/a><br \/>\n \t<BR><br \/>\n <BR><\/BR><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Spring Security Vulnerability Let Attackers Determine Which Usernames are Valid A serious vulnerability related to information exposure (CVE-2025-22234) impacts several versions of the spring-security-crypto package. The flaw enables attackers to determine valid usernames through timing attacks, undermining a key security feature designed to prevent user enumeration.\u00a0 The vulnerability affects Spring Security versions 5.7.16, 5.8.18, 6.0.16, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[129,63,652,131],"tags":[130],"class_list":["post-3528","post","type-post","status-publish","format-standard","hentry","category-cyber-security","category-cyber-security-news","category-security-news","category-vulnerability","tag-cyber-security-news"],"_links":{"self":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/3528"}],"collection":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/comments?post=3528"}],"version-history":[{"count":0,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/3528\/revisions"}],"wp:attachment":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/media?parent=3528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/categories?post=3528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/tags?post=3528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}