GHSA-w3w6-26f2-p474 CVE-2024-22234
Broken Access Control in Spring Security With Direct Use of isFullyAuthenticated
- Severity
- 7.4 / 10
- High · CVSS 3.1
- Exploit chance (EPSS)
- 0.68%
- Chance of exploitation in the next 30 days. Higher than 52.47% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-284 Improper Access Control
- Fix
6.1.7- Upgrade org.springframework.security:spring-security-core to this version or later
Description
In Spring Security, versions 6.1.x prior to 6.1.7 and versions 6.2.x prior to 6.2.2, an application is vulnerable to broken access control when it directly uses the AuthenticationTrustResolver.isFullyAuthenticated(Authentication) method.
Specifically, an application is vulnerable if:
- The application uses AuthenticationTrustResolver.isFullyAuthenticated(Authentication) directly and a null authentication parameter is passed to it resulting in an erroneous true return value.
An application is not vulnerable if any of the following is true:
- The application does not use AuthenticationTrustResolver.isFullyAuthenticated(Authentication) directly.
- The application does not pass null to AuthenticationTrustResolver.isFullyAuthenticated
- The application only uses isFullyAuthenticated via Method Security https://docs.spring.io/spring-security/reference/servlet/authorization/method-security.html or HTTP Request Security https://docs.spring.io/spring-security/reference/servlet/authorization/authorize-http-requests.html
Affected versions
Maven
| Package | Vulnerable | Fixed in |
|---|---|---|
| org.springframework.security:spring-security-core | >= 6.1.0, < 6.1.7 |
6.1.7 |
| org.springframework.security:spring-security-core | >= 6.2.0, < 6.2.2 |
6.2.2 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
org.springframework.security:spring-security-core Maven → 6.1.7
- maven
<dependency><groupId>org.springframework.security</groupId><artifactId>spring-security-core</artifactId><version>6.1.7</version></dependency>- gradle
implementation("org.springframework.security:spring-security-core:6.1.7")
Severity breakdown
CVSS 3.1 7.4
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- None
Weakness
CWE-284: Improper Access Control
The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.
How to prevent it
- Architecture and Design, Operation: Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.
- Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.
References
Advisories
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-vxf7-qj7q-83fh Spring Security Vulnerable to User Attribute Enumeration when Using DaoAuthenticationProvider | Low | Also affects org.springframework.security:spring-security-core |
| GHSA-x2wq-9x2f-fhj7 Spring Security Core has a TOCTOU race condition when One-Time Token login with JdbcOneTimeTokenService is configured | Medium | Also affects org.springframework.security:spring-security-core |
| GHSA-vqxh-445g-37fc Spring Security has a broken timing attack mitigation implemented in DaoAuthenticationProvide | Medium | Also affects org.springframework.security:spring-security-core |
| GHSA-8v5q-rhf3-jphm Spring Security annotation detection mechanism has authorization bypass | High | Also affects org.springframework.security:spring-security-core |
| GHSA-9pp5-9c7g-4r83 Spring Security authorization bypass for method security annotations on private methods | Critical | Also affects org.springframework.security:spring-security-core |
| GHSA-hh3m-g4qj-4835 Spring Security Vulnerable to Authorization Bypass via Security Annotations | Medium | Also affects org.springframework.security:spring-security-core |
| GHSA-q3v6-hm2v-pw99 Spring Framework has Authorization Bypass for Case Sensitive Comparisons | Medium | Also affects org.springframework.security:spring-security-core |
| GHSA-hmqf-wpq9-jq83 Spring Security Missing Authorization vulnerability | High | Also affects org.springframework.security:spring-security-core |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor