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)


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Mature
EPSS
0.44% (76th percentile)

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 IDSNYK-JAVA-ORGSPRINGFRAMEWORKSECURITYOAUTH-173755
  • published8 Mar 2019
  • disclosed7 Mar 2019
  • creditDirk Koehler

Introduced: 7 Mar 2019

CVE-2019-3778  (opens in a new tab)
CWE-255  (opens in a new tab)

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

CVSS Scores

version 3.1