CVE-2018-1258: Spring Framework Spring Framework When Used Vulnerability

HIGH
Advisory Identifier: GHSA-cxrj-66c5-9fmh
CVSS 8.8
CWE-863
Published
Advisory Summary

CVE-2018-1258 is a HIGH (CVSS 8.8) spring framework when used vulnerability (CWE-863: Incorrect Authorization) affecting Spring Framework libraries in the Maven ecosystem. The issue involves spring framework when used in combination with any versions of spring security contains an authorization bypass. Remediation is available by upgrading affected packages to version 5.0.6.RELEASE.

CVE-2018-1258 at a Glance

CVE Identifier CVE-2018-1258
GHSA Identifier GHSA-cxrj-66c5-9fmh
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-863: Incorrect Authorization
Affected Product Spring Framework
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 8.8

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
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-1258

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:spring-core fixed: 5.0.6.RELEASE
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-core</artifactId>
    <version>5.0.6.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

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.springframework

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 5.0.6.RELEASE), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.springframework 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-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. 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 Framework version 5.0.5 when used in combination with any versions of Spring Security contains an authorization bypass when using method security. An unauthorized malicious user can gain unauthorized access to methods that should be restricted.

CVE-2018-1258 Affected Spring Framework Versions

1 component(s)
Fixed Versions:
5.0.6.RELEASE
Product / Package Ecosystem Affected Versions Fixed Version
org.springframework:spring-core
Maven
≥ 5.0.5.RELEASE
< 5.0.6.RELEASE
All 1 versions
5.0.5.RELEASE
5.0.6.RELEASE

References

NVD — CVE-2018-1258 NVD
https://nvd.nist.gov/vuln/detail/CVE-2018-1258
Security Fix Commit FIX COMMIT
https://github.com/spring-projects/spring-framework/commit/7b8fa90d96aaf751a3256fa755d5f17e081c20f1
Spring Framework Security Information SECURITY
https://www.oracle.com/technetwork/security-advisory/cpujul2019-5072835.html
Spring Framework Security Information SECURITY
https://www.oracle.com/technetwork/security-advisory/cpujan2019-5072801.html
Spring Framework Security Information SECURITY
https://www.oracle.com/technetwork/security-advisory/cpuapr2019-5072813.html
Spring Framework Security Information SECURITY
https://www.oracle.com/security-alerts/cpuoct2021.html
Spring Framework Security Information SECURITY
https://www.oracle.com/security-alerts/cpujul2020.html
Spring Framework Security Information SECURITY
https://www.oracle.com/security-alerts/cpujan2021.html
Spring Framework Security Information SECURITY
https://www.oracle.com/security-alerts/cpujan2020.html
Spring Framework Security Information SECURITY
https://www.oracle.com/security-alerts/cpuapr2020.html
Spring Framework Security Information SECURITY
https://web.archive.org/web/20200807033751/http://www.securitytracker.com/id/1041896
Spring Framework Security Information SECURITY
https://web.archive.org/web/20200807025819/http://www.securitytracker.com/id/1041888
Spring Framework Security Information SECURITY
https://web.archive.org/web/20200227032934/http://www.securityfocus.com/bid/104222
Spring Framework Security Information SECURITY
https://security.netapp.com/advisory/ntap-20181018-0002
Spring Framework Security Information SECURITY
https://pivotal.io/security/cve-2018-1258
Spring Framework Source Repository REPOSITORY
https://github.com/spring-projects/spring-framework
GitHub Advisory / Wiki ADVISORY
https://github.com/advisories/GHSA-cxrj-66c5-9fmh
access.redhat.com/errata/rhsa-2019:24... WEB
https://access.redhat.com/errata/RHSA-2019:2413
Spring Framework Security Information SECURITY
http://www.oracle.com/technetwork/security-advisory/cpujul2018-4258247.html
Spring Framework Security Information SECURITY
http://www.oracle.com/technetwork/security-advisory/cpuoct2018-4428296.html

Frequently Asked Questions

What is CVE-2018-1258?
CVE-2018-1258 is a security vulnerability in Spring Framework involving Spring Framework when used in combination with any versions of Spring Security contains an authorization bypass under CWE-863: Incorrect Authorization.
Which Spring Framework versions are affected?
Affected versions include releases prior to 5.0.6.RELEASE across affected packages: org.springframework:spring-core.
What version fixes CVE-2018-1258?
Upgrading to 5.0.6.RELEASE (or the latest patched release for your respective branch) resolves the vulnerability.
Is spring-core affected?
Yes, org.springframework:spring-core is affected in releases prior to 5.0.6.RELEASE. Upgrade your dependency to 5.0.6.RELEASE or later.
What is the CVSS score of CVE-2018-1258?
CVE-2018-1258 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2018-1258?
CVE-2018-1258 is classified under CWE-863: Incorrect Authorization (The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.).
How can I check Maven dependencies for CVE-2018-1258?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.springframework'. 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-cxrj-66c5-9fmh",
  "modified" : "2024-03-14T21:08:21Z",
  "published" : "2018-10-17T20:05:49Z",
  "aliases" : [ "CVE-2018-1258" ],
  "summary" : "Spring Framework when used in combination with any versions of Spring Security contains an authorization bypass",
  "details" : "Spring Framework version 5.0.5 when used in combination with any versions of Spring Security contains an authorization bypass when using method security. An unauthorized malicious user can gain unauthorized access to methods that should be restricted.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework:spring-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.5.RELEASE"
      }, {
        "fixed" : "5.0.6.RELEASE"
      } ]
    } ],
    "versions" : [ "5.0.5.RELEASE" ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-1258"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-framework/commit/7b8fa90d96aaf751a3256fa755d5f17e081c20f1"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/technetwork/security-advisory/cpujul2019-5072835.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/technetwork/security-advisory/cpujan2019-5072801.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/technetwork/security-advisory/cpuapr2019-5072813.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuoct2021.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujul2020.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujan2021.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujan2020.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuapr2020.html"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20200807033751/http://www.securitytracker.com/id/1041896"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20200807025819/http://www.securitytracker.com/id/1041888"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20200227032934/http://www.securityfocus.com/bid/104222"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20181018-0002"
  }, {
    "type" : "WEB",
    "url" : "https://pivotal.io/security/cve-2018-1258"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/spring-projects/spring-framework"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-cxrj-66c5-9fmh"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:2413"
  }, {
    "type" : "WEB",
    "url" : "http://www.oracle.com/technetwork/security-advisory/cpujul2018-4258247.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.oracle.com/technetwork/security-advisory/cpuoct2018-4428296.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:33:19Z",
    "nvd_published_at" : "2018-05-11T20:29:00Z"
  }
}