Patchfirst
CVE-2018-15758 Critical · 9.6 EPSS 2.2%

Privilege Escalation in spring-security-oauth2

Fix:upgrade spring-security-oauth2 to 2.1.4.RELEASE also fixes CVE-2019-3778 Details ↓

Pivotal · Spring Security OAuth

Summary

Spring Security OAuth (Pivotal) contains a privilege escalation flaw in the Authorization Server's approval endpoint, affecting older releases in the 2.0 through 2.3 lines. An attacker with low-privilege access over the network can craft a request that modifies a previously saved authorization request, leading to privilege escalation on the subsequent approval, but only where the application acts as an Authorization Server (e.g. @EnableAuthorizationServer) and uses a custom approval endpoint that declares AuthorizationRequest as a controller method argument.

Official description · CVE.org

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).

Breakdown
23.2 / 100
Exploited
Not confirmed
Reports
0
Tactics
2/15

How an attack unfolds

Based on mappings. Select a step to see the evidence.
  1. How attackers get in

  2. What they do

Disclosed on 18 Oct 2018. No public exploit code or confirmed exploitation is recorded.

5 fixes in spring-security-oauth2 over 5 years. The latest fix listed for spring-security-oauth2 is 2.5.2.RELEASE.

Fixes in spring-security-oauth2Maven package, by fixed version. Earlier and later fixes in the same package, not necessarily the same bug.

  1. 2.0.10CVE-2016-497725 May 2017
  2. 2.3.3CVE-2018-126011 May 2018
  3. 2.3.4.RELEASECVE-2018-1575818 Oct 2018
  4. 2.3.5.RELEASECVE-2019-37787 Mar 2019
  5. 2.5.2.RELEASECVE-2022-2296921 Apr 2022Latest listed

techniques

2 , grouped by in kill-chain order 2

Initial AccessTA0001

MITRE CTID mapping of the CVE · how it is exploited

Privilege EscalationTA0004

MITRE CTID mapping of the CVE · primary impact

Detection

0 rules for this CVE · 180 general rules for its techniques

Rules for this CVE

0 that reference CVE-2018-15758 directly.

CVE-specific rules are not available in this build. Search SigmaHQ ↗

Sigma rules © SigmaHQ, Detection Rule License 1.1; linked, not reproduced.

Affected versions and fixes

as published in the CVE record

Pivotal Spring Security OAuth

Affected: >= 2.3, <= 2.3.3 · >= 2.2, <= 2.2.2 · >= 2.1, <= 2.1.2 · >= 2.0, <= 2.0.15

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: org.springframework.security.oauth:spring-security-oauth2.

Mavenorg.springframework.security.oauth:spring-security-oauth2GHSA-h8w4-qv99-f7vj

Upgrade to 2.1.4.RELEASE

Fixes this CVE and 1 other known vulnerability in this package (CVE-2019-3778).

Also affected, despite being newer: 2.3.0 up to 2.3.4.RELEASE; 2.2.0 up to 2.2.3.RELEASE.

Set the version to 2.1.4.RELEASE or later in your pom.xml or build.gradle.

First fixed in 2.1.3 for CVE-2018-15758.

Affected versions, by release line

If you runUpgrade to
2.3.0 up to 2.3.4.RELEASE2.3.5.RELEASEfirst fix for this CVE: 2.3.4.RELEASE
2.2.0 up to 2.2.3.RELEASE2.2.4.RELEASEfirst fix for this CVE: 2.2.3.RELEASE
2.1.0 up to 2.1.32.1.4.RELEASEfirst fix for this CVE: 2.1.3
2.0.0 up to 2.0.162.0.17.RELEASEfirst fix for this CVE: 2.0.16

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

References

3 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close