# CVE-2022-41923: Grails Spring Security Core plugin vulnerable to privilege escalation

> Attackers can access restricted endpoints by meeting authorization requirements of different endpoints, leading to privilege escalation in Grails applications.

- **Severity:** Critical 9.1 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 23 Nov 2022
- **Updated:** 23 Apr 2025
- **Also known as:** GHSA-frqg-vvxg-jqqh

## What is CVE-2022-41923?

CVE-2022-41923 is a critical vulnerability in grails-spring-security-core, published on 23 Nov 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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.

Weakness: CWE-863 (Incorrect Authorization), CWE-269 (Improper Privilege Management)

## Which versions are affected by CVE-2022-41923?

It affects 1 product.


Products: Grails Spring Security Core.

## How do I fix CVE-2022-41923?

No fix has been published for CVE-2022-41923 yet. Limit exposure of the affected software until one is available.

## Is CVE-2022-41923 being exploited?

There is no known exploitation of CVE-2022-41923 in the wild and no public exploit code.

Public exploit code:

- https://github.com/grails/GSSC-CVE-2022-41923 (github_poc): https://github.com/grails/GSSC-CVE-2022-41923

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-41923 and fix it if it is affected.

What it is: CVE-2022-41923 is a critical vulnerability in grails-spring-security-core, published on 23 Nov 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2022-41923 in the wild and no public exploit code.

Affected product: grails-spring-security-core. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-41923/ (Markdown: https://insights.sbomify.com/CVE-2022-41923/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-41923
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-41923
- OSV: https://osv.dev/vulnerability/CVE-2022-41923

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-41923/
Summaries are generated and may contain mistakes; the official description above is the record.
