CVE-2025-22223: Spring Security Core Authorization Bypass Vulnerability

Summary

24/03/2025
Yes i
Moderate
5.3

CVE-2025-22223: Spring Security Vulnerable to Authorization Bypass via Security Annotations. Affects org.springframework.security:spring-security-core versions >= 6.4.0, < 6.4.4. Fixed in 6.4.4. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Spring Security is a powerful and customizable authentication and access-control framework for Java applications. It provides comprehensive security services for Java EE-based enterprise software applications. The framework is widely used to secure applications by managing user authentication and authorization. However, versions 6.4.0 to 6.4.3 of Spring Security contain a vulnerability that may allow unauthorized access due to improper handling of method security annotations on parameterized types or methods.

Vulnerability Detail

The vulnerability in Spring Security versions 6.4.0 to 6.4.3 arises from the framework's failure to correctly locate method security annotations on parameterized types or methods. This oversight can lead to an authorization bypass, allowing users to access methods without the necessary permissions. The issue is particularly concerning for applications that utilize the @EnableMethodSecurity annotation and have method security annotations on parameterized types or methods. If these conditions are met, unauthorized users may gain access to sensitive functionality, potentially compromising application security.

How To Fix

Latest published version: 7.2.0-RC1 as of 23 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

6.4.4

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If you cannot immediately upgrade to the patched version, consider the following workaround:

  • Avoid using @EnableMethodSecurity if possible.
  • Ensure that all method security annotations are attached directly to the target methods rather than parameterized types or methods. This may help mitigate the risk of authorization bypass until an upgrade can be performed.

Conclusion

In summary, the Spring Security vulnerability identified as CVE-2025-22223 poses a risk of authorization bypass in versions 6.4.0 to 6.4.3. It is crucial for developers to update to version 6.4.4 or later to mitigate this risk. Additionally, understanding the nature of the vulnerability and implementing the suggested workarounds can help maintain application security until an upgrade is feasible.

See every vulnerability recorded for org.springframework.security:spring-security-core →

Share this vulnerability

FAQ

Spring Security versions 6.4.0 to 6.4.3 are affected by this vulnerability.

The CVSS score of this vulnerability is 5.3, indicating a moderate severity level.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

If an immediate upgrade is not possible, consider avoiding the use of @EnableMethodSecurity and ensure that method security annotations are applied directly to target methods.

The potential consequences include unauthorized access to sensitive methods and functionalities, which can compromise the security of your application.

Related vulnerabilities

Recent vulnerabilities recorded for org.springframework.security:spring-security-core.

How To Fix

Latest published version: 7.2.0-RC1 as of 23 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

6.4.4

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback