Credentials Disclosure Affecting org.springframework.security.oauth:spring-security-oauth2 package, versions [2.3.0.RELEASE,2.3.5.RELEASE) [2.2.0.RELEASE,2.2.4.RELEASE) [2.1.0.RELEASE,2.1.4.RELEASE) [,2.0.17.RELEASE)


0.0
critical

Snyk CVSS

    Attack Complexity Low
    Confidentiality High
    Integrity High

    Threat Intelligence

    Exploit Maturity Mature
    EPSS 0.53% (77th percentile)
Expand this section
NVD
6.5 medium

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-JAVA-ORGSPRINGFRAMEWORKSECURITYOAUTH-173755
  • published 8 Mar 2019
  • disclosed 7 Mar 2019
  • credit Dirk Koehler

How to fix?

Upgrade org.springframework.security.oauth:spring-security-oauth2 to version 2.3.5.RELEASE, 2.2.4.RELEASE, 2.1.4.RELEASE, 2.0.17.RELEASE or higher.

Overview

org.springframework.security.oauth:spring-security-oauth2 is a package that provides support for using Spring Security with OAuth (1a) and OAuth2.

Affected versions of this package are vulnerable to Credentials Disclosure due to the package being 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)
  • 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).