CVE-2022-41923: Grails Spring Security Core plugin vulnerable to privilege escalation
Grails Spring Security Core plugin is vulnerable to privilege escalation. The vulnerability allows an attacker access to one endpoint (i.e. the targeted endpoint) using the authorization requirements of a different endpoint (i.e. the donor endpoint). In some Grails framework applications, access to the targeted endpoint will be granted based on meeting the authorization requirements of the donor endpoint, which can result in a privilege escalation attack. This vulnerability has been patched in grails-spring-security-core versions 3.3.2, 4.0.5 and 5.1.1. Impacted Applications: Grails Spring Security Core plugin versions: 1.x 2.x >=3.0.0 <3.3.2 >=4.0.0 <4.0.5 >=5.0.0 <5.1.1 We strongly suggest that all Grails framework applications using the Grails Spring Security Core plugin be updated to a patched release of the plugin. Workarounds: Users should create a subclass extending one of the following classes from the grails.plugin.springsecurity.web.access.intercept package, depending on their security configuration: AnnotationFilterInvocationDefinition InterceptUrlMapFilterInvocationDefinition RequestmapFilterInvocationDefinition In each case, the subclass should override the calculateUri method like so: @Override protected String calculateUri(HttpServletRequest request) { UrlPathHelper.defaultInstance.getRequestUri(request) } This should be considered a temporary measure, as the patched versions of grails-spring-security-core deprecates the calculateUri method. Once upgraded to a patched version of the plugin, this workaround is no longer needed. The workaround is especially important for version 2.x, as no patch is available version 2.x of the GSSC plugin.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
grails-spring-security-coreto a version that resolves this vulnerability.Fixed in 3.3.2 - Upgrade
Upgrade
grails-spring-security-coreto a version that resolves this vulnerability.Fixed in 4.0.5 - Upgrade
Upgrade
grails-spring-security-coreto a version that resolves this vulnerability.Fixed in 5.1.1 - Configuration
If you cannot upgrade (especially Grails Spring Security Core 2.x, where no patch is available), create a subclass extending one of these classes depending on your configuration: AnnotationFilterInvocationDefinition, InterceptUrlMapFilterInvocationDefinition, or RequestmapFilterInvocationDefinition. In that subclass, override calculateUri exactly to return UrlPathHelper.defaultInstance.getRequestUri(request). Consider it temporary since patched versions deprecate calculateUri.
grails.plugin.springsecurity.web.access.intercept (subclass of authorization filter invocation definition) Override calculateUri(HttpServletRequest request) to return UrlPathHelper.defaultInstance.getRequestUri(request) = @Override protected String calculateUri(HttpServletRequest request) { UrlPathHelper.defaultInstance.getRequestUri(request) }
Event History
Frequently Asked Questions
What is the vulnerability ID for the Grails Spring Security Core plugin?
The vulnerability ID for the Grails Spring Security Core plugin is CVE-2022-41923.
What is the severity of CVE-2022-41923?
The severity of CVE-2022-41923 is critical with a CVSS score of 9.8.
How does the vulnerability in the Grails Spring Security Core plugin allow privilege escalation?
The vulnerability in the Grails Spring Security Core plugin allows an attacker to access one endpoint using the authorization requirements of a different endpoint, leading to privilege escalation.
Which versions of the Grails Spring Security Core plugin are affected by CVE-2022-41923?
Versions 1.0 to 3.3.2, 4.0.0 to 4.0.5, and 5.0.0 to 5.1.1 of the Grails Spring Security Core plugin are affected by CVE-2022-41923.
How can I fix the vulnerability in the Grails Spring Security Core plugin?
To fix the vulnerability in the Grails Spring Security Core plugin, it is recommended to update to a version that is not affected by CVE-2022-41923.