Authorization bypass in org.springframework.security.oauth:spring-security-oauth2GHSA-h8w4-qv99-f7vj
HIGHFix: spring-attic/spring-security-oauth@4082ec7GHSA-h8w4-qv99-f7vj is a high-severity (CVSS 8.1) vulnerability in org.springframework.security.oauth:spring-security-oauth2. A fix is available for org.springframework.security.oauth:spring-security-oauth2 — see the affected versions and patch details below.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
org.springframework.security.oauth:spring-security-oauth2☕org.springframework.security.oauth:spring-security-oauth2☕org.springframework.security.oauth:spring-security-oauth2☕org.springframework.security.oauth:spring-security-oauth2Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
Spring Security OAuth, versions 2.3 prior to 2.3.4, and 2.2 prior to 2.2.3, and 2.1 prior to 2.1.3, and 2.0 prior to 2.0.16, and older unsupported versions could be susceptible to a privilege escalation under certain conditions. A malicious user or attacker can craft a request to the approval endpoint that can modify the previously saved authorization request and lead to a privilege escalation on the subsequent approval. This scenario can happen if the application is configured to use a custom approval endpoint that declares AuthorizationRequest as a controller method argument. This vulnerability exposes applications that meet all of the following requirements: Act in the role of an Authorization Server (e.g. @EnableAuthorizationServer) and use a custom Approval Endpoint that declares AuthorizationRequest as a controller method argument. This vulnerability does not expose applications that: Act in the role of an Authorization Server and use the default Approval Endpoint, act in the role of a Resource Server only (e.g. @EnableResourceServer), act in the role of a Client only (e.g. @EnableOAuthClient).
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.springframework.security.oauth:spring-security-oauth2 | ≥ 2.0.0&&< 2.0.16 | 2.0.16org.springframework.security.oauth:spring-security-oauth2:2.0.16 |
| ☕Maven | org.springframework.security.oauth:spring-security-oauth2 | ≥ 2.1.0&&< 2.1.3 | 2.1.3org.springframework.security.oauth:spring-security-oauth2:2.1.3 |
| ☕Maven | org.springframework.security.oauth:spring-security-oauth2 | ≥ 2.2.0&&< 2.2.3.RELEASE | 2.2.3.RELEASEorg.springframework.security.oauth:spring-security-oauth2:2.2.3.RELEASE |
| ☕Maven | org.springframework.security.oauth:spring-security-oauth2 | ≥ 2.3.0&&< 2.3.4.RELEASE | 2.3.4.RELEASEorg.springframework.security.oauth:spring-security-oauth2:2.3.4.RELEASE |
Affected Products
spring security oauthpivotal_softwareDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.springframework.security.oauth:spring-security-oauth2, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.springframework.security.oauth:spring-security-oauth2 to 2.0.16 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-h8w4-qv99-f7vj is resolved across your whole dependency graph.
Workarounds
Close the privilege gap rather than the entry point: audit which accounts, roles and service identities can reach the affected operation, drop the component to the least privilege it actually needs, and review file and directory permissions created by earlier installs — a default left in place is what makes this reachable.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Fuse 7.4.0 | spring-security-oauth | RHSA-2019:2413 |
Frequently Asked Questions
Is GHSA-h8w4-qv99-f7vj in your dependencies?
Find it across Maven, including transitive dependencies.