CVE-2022-31692: Spring Framework Spring Security Authorization Rules Can Vulnerability
CRITICALCVE-2022-31692 is a CRITICAL (CVSS 9.8) spring security authorization rules can vulnerability (CWE-863: Incorrect Authorization) affecting Spring Framework libraries in the Maven ecosystem. The issue involves spring security authorization rules can be bypassed via forward or include dispatcher types. Remediation is available by upgrading affected packages to version 5.7.5, 5.6.9.
CVE-2022-31692 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2022-31692
To remediate this vulnerability, upgrade all affected Spring Framework dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>5.7.5</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>5.6.9</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.springframework.security
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2022-31692, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.springframework.security
Analyze the terminal output to locate any version of Spring Framework in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.7.5), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.springframework.security command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Spring Framework, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-31692 Affected Spring Framework Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.springframework.security:spring-security-core
|
Maven |
≥ 5.7.0
< 5.7.5
|
5.7.5
|
|
org.springframework.security:spring-security-core
|
Maven |
≥ 5.6.0
< 5.6.9
|
5.6.9
|
References
Frequently Asked Questions
What is CVE-2022-31692?
Which Spring Framework versions are affected?
What version fixes CVE-2022-31692?
Is spring-security-core affected?
What is the CVSS score of CVE-2022-31692?
What CWE is associated with CVE-2022-31692?
How can I check Maven dependencies for CVE-2022-31692?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mmmh-wcxm-2wr4",
"modified" : "2022-11-02T21:50:03Z",
"published" : "2022-11-01T12:00:37Z",
"aliases" : [ "CVE-2022-31692" ],
"summary" : "Spring Security authorization rules can be bypassed via forward or include dispatcher types",
"details" : "Spring Security, versions 5.7 prior to 5.7.5 and 5.6 prior to 5.6.9 could be susceptible to authorization rules bypass via forward or include dispatcher types. Specifically, an application is vulnerable when all of the following are true: The application expects that Spring Security applies security to forward and include dispatcher types. The application uses the AuthorizationFilter either manually or via the authorizeHttpRequests() method. The application configures the FilterChainProxy to apply to forward and/or include requests (e.g. spring.security.filter.dispatcher-types = request, error, async, forward, include). The application may forward or include the request to a higher privilege-secured endpoint.The application configures Spring Security to apply to every dispatcher type via authorizeHttpRequests().shouldFilterAllDispatcherTypes(true)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.springframework.security:spring-security-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.7.0"
}, {
"fixed" : "5.7.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.springframework.security:spring-security-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.6.0"
}, {
"fixed" : "5.6.9"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-31692"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/spring-projects/spring-security"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20221215-0010"
}, {
"type" : "WEB",
"url" : "https://tanzu.vmware.com/security/cve-2022-31692"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-863" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-11-01T19:00:59Z",
"nvd_published_at" : "2022-10-31T20:15:00Z"
}
}