Vulnerabilities in pkg:maven/org.springframework.security.oauth/spring-security-oauth2

PACKAGE
Advisory Identifier: GHSA-rrpm-pj7p-7j9q
Advisory Summary

CVE-2018-1260 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Spring Framework libraries in the Maven ecosystem. The issue involves spring security oauth vulnerable to remote code execution (rce). Remediation is available by upgrading affected packages to version 2.3.3, 2.2.2, 2.1.2, 2.0.15.

5 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.springframework.security.oauth/spring-security-oauth2

5 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.springframework.security.oauth/spring-security-oauth2. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-rrpm-pj7p-7j9q CVE-2018-1260 CRITICAL Spring Security OAuth vulnerable to remote code execution (RCE)
GHSA-7q9c-h23x-65fq CVE-2016-4977 HIGH Spring Security OAuth vulnerable to remote code execution (RCE) via specially crafted request using whitelabel views
GHSA-c2cp-3xj9-97w9 CVE-2022-22969 MODERATE Denial of service in Spring Security OAuth2
GHSA-h8w4-qv99-f7vj CVE-2018-15758 HIGH Authorization bypass in org.springframework.security.oauth:spring-security-oauth2
GHSA-77rv-6vfw-x4gc CVE-2019-3778 MODERATE spring-security-oauth and spring-security-oauth2 Open Redirect vulnerability

CVE-2018-1260 at a Glance

CVE Identifier CVE-2018-1260
GHSA Identifier GHSA-rrpm-pj7p-7j9q
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Spring Framework
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2018-1260

To remediate this vulnerability, upgrade all affected Spring Framework dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.springframework.security.oauth:spring-security-oauth2 fixed: 2.3.3
<dependency>
    <groupId>org.springframework.security.oauth</groupId>
    <artifactId>spring-security-oauth2</artifactId>
    <version>2.3.3</version>
</dependency>
org.springframework.security.oauth:spring-security-oauth2 fixed: 2.2.2
<dependency>
    <groupId>org.springframework.security.oauth</groupId>
    <artifactId>spring-security-oauth2</artifactId>
    <version>2.2.2</version>
</dependency>
org.springframework.security.oauth:spring-security-oauth2 fixed: 2.1.2
<dependency>
    <groupId>org.springframework.security.oauth</groupId>
    <artifactId>spring-security-oauth2</artifactId>
    <version>2.1.2</version>
</dependency>
org.springframework.security.oauth:spring-security-oauth2 fixed: 2.0.15
<dependency>
    <groupId>org.springframework.security.oauth</groupId>
    <artifactId>spring-security-oauth2</artifactId>
    <version>2.0.15</version>
</dependency>
org.springframework.security.oauth:spring-security-oauth2 fixed: Latest secure release
<dependency>
    <groupId>org.springframework.security.oauth</groupId>
    <artifactId>spring-security-oauth2</artifactId>
    <version>Latest secure release</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.springframework.security.oauth

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2018-1260, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.springframework.security.oauth

Analyze the terminal output to locate any version of Spring Framework in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.3), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.springframework.security.oauth command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Spring Framework, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Spring Security OAuth versions prior to 2.3.3, prior to 2.2.2, prior to 2.1.2, and prior to 2.0.15 contain a remote code execution vulnerability. An attacker can craft an authorization request to the authorization endpoint that can lead to remote code execution when the resource owner is forwarded to the approval endpoint.

CVE-2018-1260 Affected Spring Framework Versions

5 component(s)
Fixed Versions:
2.3.32.2.22.1.22.0.15
Product / Package Ecosystem Affected Versions Fixed Version
org.springframework.security.oauth:spring-security-oauth2
Maven
≥ 2.3.0
< 2.3.3
2.3.3
org.springframework.security.oauth:spring-security-oauth2
Maven
≥ 2.2.0
< 2.2.2
2.2.2
org.springframework.security.oauth:spring-security-oauth2
Maven
≥ 2.1.0
< 2.1.2
2.1.2
org.springframework.security.oauth:spring-security-oauth2
Maven
≥ 2.0.0
< 2.0.15
2.0.15
org.springframework.security.oauth:spring-security-oauth2
Maven
≥ 1.0.0
≤ 1.0.5

References

Frequently Asked Questions

What is CVE-2018-1260?
CVE-2018-1260 is a security vulnerability in Spring Framework involving Spring Security OAuth vulnerable to remote code execution (RCE) under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Spring Framework versions are affected?
Affected versions include releases prior to 2.3.3, 2.2.2, 2.1.2, 2.0.15 across affected packages: org.springframework.security.oauth:spring-security-oauth2.
What version fixes CVE-2018-1260?
Upgrading to 2.3.3, 2.2.2, 2.1.2, 2.0.15 (or the latest patched release for your respective branch) resolves the vulnerability.
Is spring-security-oauth2 affected?
Yes, org.springframework.security.oauth:spring-security-oauth2 is affected in releases prior to 2.3.3, 2.2.2, 2.1.2, 2.0.15, Latest secure release. Upgrade your dependency to 2.3.3, 2.2.2, 2.1.2, 2.0.15, Latest secure release or later.
What is the CVSS score of CVE-2018-1260?
CVE-2018-1260 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2018-1260?
CVE-2018-1260 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check Maven dependencies for CVE-2018-1260?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.springframework.security.oauth'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rrpm-pj7p-7j9q",
  "modified" : "2024-05-14T17:55:41Z",
  "published" : "2018-10-18T18:05:34Z",
  "aliases" : [ "CVE-2018-1260" ],
  "summary" : "Spring Security OAuth vulnerable to remote code execution (RCE)",
  "details" : "Spring Security OAuth versions prior to 2.3.3, prior to 2.2.2, prior to 2.1.2, and prior to 2.0.15 contain a remote code execution vulnerability. An attacker can craft an authorization request to the authorization endpoint that can lead to remote code execution when the resource owner is forwarded to the approval endpoint. ",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.security.oauth:spring-security-oauth2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.3.0"
      }, {
        "fixed" : "2.3.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.security.oauth:spring-security-oauth2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.2.0"
      }, {
        "fixed" : "2.2.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.security.oauth:spring-security-oauth2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.1.0"
      }, {
        "fixed" : "2.1.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.security.oauth:spring-security-oauth2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.0.15"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.security.oauth:spring-security-oauth2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "last_affected" : "1.0.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-1260"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2018:1809"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2018:2939"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-rrpm-pj7p-7j9q"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/spring-attic/spring-security-oauth"
  }, {
    "type" : "WEB",
    "url" : "https://pivotal.io/security/cve-2018-1260"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20200227123539/http://www.securityfocus.com/bid/104158"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:55:47Z",
    "nvd_published_at" : null
  }
}