GHSA-h8w4-qv99-f7vj
HIGHGHSA-h8w4-qv99-f7vj is a high-severity (CVSS 8.1) vulnerability in org.springframework.security.oauth:spring-security-oauth2. O3 Security confirms whether GHSA-h8w4-qv99-f7vj is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
Authorization bypass in org.springframework.security.oauth:spring-security-oauth2
Blast Radius
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.16 |
| ☕Maven | org.springframework.security.oauth:spring-security-oauth2 | ≥ 2.1.0&&< 2.1.3 | 2.1.3 |
| ☕Maven | org.springframework.security.oauth:spring-security-oauth2 | ≥ 2.2.0&&< 2.2.3.RELEASE | 2.2.3.RELEASE |
| ☕Maven | org.springframework.security.oauth:spring-security-oauth2 | ≥ 2.3.0&&< 2.3.4.RELEASE | 2.3.4.RELEASE |
Detection & 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. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
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
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-h8w4-qv99-f7vj is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-h8w4-qv99-f7vj. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-h8w4-qv99-f7vj in your dependencies?
O3 detects GHSA-h8w4-qv99-f7vj across Maven dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.