CVE-2024-22257

8.2 HIGH

📋 TL;DR

This vulnerability in Spring Security allows broken access control when applications directly use AuthenticatedVoter#vote with a null Authentication parameter. Attackers could bypass authorization checks and access restricted resources. Affects Spring Security versions 5.7.x, 5.8.x, 6.0.x, 6.1.x, and 6.2.x within specified ranges.

💻 Affected Systems

Products:
  • Spring Security
Versions: 5.7.x prior to 5.7.12, 5.8.x prior to 5.8.11, 6.0.x prior to 6.0.9, 6.1.x prior to 6.1.8, 6.2.x prior to 6.2.3
Operating Systems: All
Default Config Vulnerable: ✅ No
Notes: Only affects applications that directly call AuthenticatedVoter#vote with null Authentication parameter. Standard Spring Security configurations may not be vulnerable.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete authorization bypass allowing unauthorized access to all protected resources and administrative functions.

🟠

Likely Case

Partial authorization bypass enabling access to some restricted endpoints or data.

🟢

If Mitigated

Minimal impact with proper authentication and authorization layers in place.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires specific application code patterns and understanding of Spring Security internals.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 5.7.12, 5.8.11, 6.0.9, 6.1.8, or 6.2.3

Vendor Advisory: https://spring.io/security/cve-2024-22257

Restart Required: Yes

Instructions:

1. Identify your Spring Security version. 2. Update to patched version: 5.7.12, 5.8.11, 6.0.9, 6.1.8, or 6.2.3. 3. Update dependencies in build configuration (Maven/Gradle). 4. Rebuild and redeploy application. 5. Restart application server.

🔧 Temporary Workarounds

Avoid direct AuthenticatedVoter usage

all

Modify application code to avoid calling AuthenticatedVoter#vote directly with null Authentication parameter.

Implement custom authorization checks

all

Add additional authorization validation before sensitive operations.

🧯 If You Can't Patch

  • Review application code for direct AuthenticatedVoter#vote calls and implement null checks
  • Implement additional authorization layers and audit all access control logic

🔍 How to Verify

Check if Vulnerable:

Check Spring Security version in pom.xml or build.gradle and verify if using AuthenticatedVoter#vote with null Authentication in code.

Check Version:

Check pom.xml for <version>org.springframework.security:spring-security-core</version> or build.gradle for implementation 'org.springframework.security:spring-security-core:VERSION'

Verify Fix Applied:

Verify Spring Security version is updated to patched version and test authorization functionality.

📡 Detection & Monitoring

Log Indicators:

  • Unauthorized access attempts to protected endpoints
  • Authentication failures followed by successful authorization

Network Indicators:

  • HTTP requests to protected resources without proper authentication headers

SIEM Query:

source="application_logs" AND (event_type="AUTHORIZATION_FAILURE" OR message="Access denied") AND user="anonymous"

🔗 References

📤 Share & Export