Patchfirst
CVE-2019-3778 Public exploit EPSS 16.6%

Open Redirect in spring-security-oauth2

Spring · Spring Security OAuth

Summary

Spring Security OAuth's AuthorizationEndpoint, when an application acts as an Authorization Server (e.g. via @EnableAuthorizationServer) and uses the DefaultRedirectResolver, fails to properly validate the redirect_uri parameter, allowing it to be an open redirect. Applications using a different RedirectResolver implementation, or acting only as a Resource Server or OAuth Client, are not exposed.

Official description · CVE.org

Spring Security OAuth, versions 2.3 prior to 2.3.5, and 2.2 prior to 2.2.4, and 2.1 prior to 2.1.4, and 2.0 prior to 2.0.17, and older unsupported versions could be susceptible to an open redirector attack that can leak an authorization code. A malicious user or attacker can craft a request to the authorization endpoint using the authorization code grant type, and specify a manipulated redirection URI via the "redirect_uri" parameter. This can cause the authorization server to redirect the resource owner user-agent to a URI under the control of the attacker with the leaked authorization code. This vulnerability exposes applications that meet all of the following requirements: Act in the role of an Authorization Server (e.g. @EnableAuthorizationServer) and uses the DefaultRedirectResolver in the AuthorizationEndpoint. This vulnerability does not expose applications that: Act in the role of an Authorization Server and uses a different RedirectResolver implementation other than DefaultRedirectResolver, act in the role of a Resource Server only (e.g. @EnableResourceServer), act in the role of a Client only (e.g. @EnableOAuthClient).

Breakdown
25.5 / 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 can follow

Public exploit code (Exploit-DB) appeared 3 months after disclosure. No confirmed exploitation is recorded.

  1. Disclosedday 0
  2. Public exploit codeExploit-DB+3 mo

2 related vulnerabilities in the same code over 3 years.

Linked vulnerabilitiesLinked by evidence that a fix failed or the same code was patched again. Oldest first.

  1. This CVECVE-2019-3778Open Redirect in spring-security-oauth27 Mar 2019
  2. relatedLow

    Why these are linked:

    • Stated in the CVE textNOTE: this is similar to CVE-2019-3778.
    CVE-2020-26877ApiFest OAuth 2.0 Server 0.3.1 does not validate the redirect…29 Jun 2022

techniques

2 , grouped by in kill-chain order 2

Initial AccessTA0001

Spearphishing Link T1566.002
MITRE CTID mapping of the CVE · how it is exploited

Stealth

Masquerading T1036
MITRE CTID mapping of the CVE · follow-on activity

Detection

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

Rules for this CVE

0 that reference CVE-2019-3778 directly.

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

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

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

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

Mavenorg.springframework.security.oauth:spring-security-oauthGHSA-77rv-6vfw-x4gc

Upgrade to 2.3.5.RELEASE or later

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

The first fix for CVE-2019-3778. No other CVE tracked by Patchfirst affects this package.

Affected versions, by release line

If you runUpgrade to
2.3.0.RELEASE up to 2.3.5.RELEASE2.3.5.RELEASE
2.2.0.RELEASE up to 2.2.4.RELEASE2.2.4.RELEASE
2.1.0.RELEASE up to 2.1.4.RELEASE2.1.4.RELEASE
All versions before 2.0.17.RELEASE2.0.17.RELEASE

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

Other packages that bundle this code (1)

Forks, repackagings and products that include the affected code. Each has its own fixed version.

  • Mavenorg.springframework.security.oauth:spring-security-oauth2
    Affected: 2.3.0.RELEASE up to 2.3.5.RELEASE; 2.2.0.RELEASE up to 2.2.4.RELEASE; 2.1.0.RELEASE up to 2.1.4.RELEASE; All versions before 2.0.17.RELEASEUpgrade to 2.3.5.RELEASE or later (older lines: 2.2.4.RELEASE, 2.1.4.RELEASE, 2.0.17.RELEASE)

Check your lockfile against all CVEs

What security researchers reported

Not named in any threat report yet

Also mentioned in 2 community threat pulses (AlienVault OTX)

Weaker evidence

Pulses are indicator collections that anyone can publish. A mention is not confirmation of exploitation.

References

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