CVE-2018-1199: Spring Framework Spring-security-core, Org.springframework.security:spring-security-core , And Org.springframework:spring-core Vulnerability

MODERATE
Advisory Identifier: GHSA-v596-fwhq-8x48
CVSS 5.3
CWE-20
Published
Advisory Summary

CVE-2018-1199 is a MODERATE (CVSS 5.3) spring-security-core, org.springframework.security:spring-security-core , and org.springframework:spring-core vulnerability (CWE-20: Improper Input Validation) affecting Spring Framework libraries in the Maven ecosystem. The issue involves spring-security-core, org.springframework.security:spring-security-core , and org.springframework:spring-core. Remediation is available by upgrading affected packages to version 4.2.4, 5.0.1, 4.3.14, 5.0.3, 4.1.5.

CVE-2018-1199 at a Glance

CVE Identifier CVE-2018-1199
GHSA Identifier GHSA-v596-fwhq-8x48
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-20: Improper Input Validation
Affected Product Spring Framework
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 5.3

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:L/I:N/A:N).

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 Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2018-1199

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:spring-security-core fixed: 4.2.4
<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-core</artifactId>
    <version>4.2.4</version>
</dependency>
org.springframework.security:spring-security-core fixed: 5.0.1
<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-core</artifactId>
    <version>5.0.1</version>
</dependency>
org.springframework:spring-core fixed: 4.3.14
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-core</artifactId>
    <version>4.3.14</version>
</dependency>
org.springframework:spring-core fixed: 5.0.3
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-core</artifactId>
    <version>5.0.3</version>
</dependency>
org.springframework.security:spring-security-core fixed: 4.1.5
<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-core</artifactId>
    <version>4.1.5</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

How to Check if You Are Affected

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

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

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

Note: The mvn dependency:tree -Dincludes=org.springframework.security 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. 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 (Spring Security 4.1.x before 4.1.5, 4.2.x before 4.2.4, and 5.0.x before 5.0.1; and Spring Framework 4.3.x before 4.3.14 and 5.0.x before 5.0.3) does not consider URL path parameters when processing security constraints. By adding a URL path parameter with special encodings, an attacker may be able to bypass a security constraint. The root cause of this issue is a lack of clarity regarding the handling of path parameters in the Servlet Specification. Some Servlet containers include path parameters in the value returned for getPathInfo() and some do not. Spring Security uses the value returned by getPathInfo() as part of the process of mapping requests to security constraints. In this particular attack, different character encodings used in path parameters allows secured Spring MVC static resource URLs to be bypassed.

CVE-2018-1199 Affected Spring Framework Versions

5 component(s)
Fixed Versions:
4.2.45.0.14.3.145.0.34.1.5
Product / Package Ecosystem Affected Versions Fixed Version
org.springframework.security:spring-security-core
Maven
≥ 4.2.0
< 4.2.4
4.2.4
org.springframework.security:spring-security-core
Maven
≥ 5.0.0
< 5.0.1
5.0.1
org.springframework:spring-core
Maven
≥ 4.3.0
< 4.3.14
4.3.14
org.springframework:spring-core
Maven
≥ 5.0.0
< 5.0.3
5.0.3
org.springframework.security:spring-security-core
Maven
≥ 4.1.0
< 4.1.5
4.1.5

References

NVD — CVE-2018-1199 NVD
https://nvd.nist.gov/vuln/detail/CVE-2018-1199
Security Fix Commit FIX COMMIT
https://github.com/spring-projects/spring-framework/commit/554662ebab87af97ba25d0c9f5449c7acda8df9c
Security Fix Commit FIX COMMIT
https://github.com/spring-projects/spring-framework/commit/73a81f98d40eb6f5faa91aceb868db53fae2a94b
Security Fix Commit FIX COMMIT
https://github.com/spring-projects/spring-framework/commit/e6e6b8f4adcad99d133de97fcfac5ae5dd14153c
Security Fix Commit FIX COMMIT
https://github.com/spring-projects/spring-security/commit/0eef5b4b425ab42b9fa0fde1a3f36a37b92558f
Security Fix Commit FIX COMMIT
https://github.com/spring-projects/spring-security/commit/65da28e4bf62f58fb130ba727cbbd621b44a36d
Security Fix Commit FIX COMMIT
https://github.com/spring-projects/spring-security/commit/cb8041ba67635edafcc934498ef82707157fd22
access.redhat.com/errata/rhsa-2018:24... WEB
https://access.redhat.com/errata/RHSA-2018:2405
GitHub Advisory / Wiki ADVISORY
https://github.com/advisories/GHSA-v596-fwhq-8x48
lists.apache.org/thread.html/4ed49b1... WEB
https://lists.apache.org/thread.html/4ed49b103f64a0cecb38064f26cbf1389afc12124653da2d35166dbe@%3Cissues.activemq.apache.org%3E
lists.apache.org/thread.html/ab825fc... WEB
https://lists.apache.org/thread.html/ab825fcade0b49becfa30235b3d54f4a51bb74ea96b6c9adb5d1378c@%3Cissues.activemq.apache.org%3E
lists.apache.org/thread.html/dcf8599... WEB
https://lists.apache.org/thread.html/dcf8599b80e43a6b60482607adb76c64672772dc2d9209ae2170f369@%3Cissues.activemq.apache.org%3E
Spring Framework Security Information SECURITY
https://pivotal.io/security/cve-2018-1199
Spring Framework Security Information SECURITY
https://www.oracle.com/security-alerts/cpujul2020.html

Frequently Asked Questions

What is CVE-2018-1199?
CVE-2018-1199 is a security vulnerability in Spring Framework involving spring-security-core, org.springframework.security:spring-security-core , and org.springframework:spring-core under CWE-20: Improper Input Validation.
Which Spring Framework versions are affected?
Affected versions include releases prior to 4.2.4, 5.0.1, 4.3.14, 5.0.3, 4.1.5 across affected packages: org.springframework.security:spring-security-core, org.springframework:spring-core.
What version fixes CVE-2018-1199?
Upgrading to 4.2.4, 5.0.1, 4.3.14, 5.0.3, 4.1.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is spring-security-core affected?
Yes, org.springframework.security:spring-security-core is affected in releases prior to 4.2.4, 5.0.1, 4.1.5. Upgrade your dependency to 4.2.4, 5.0.1, 4.1.5 or later.
Is spring-core affected?
Yes, org.springframework:spring-core is affected in releases prior to 4.3.14, 5.0.3. Upgrade your dependency to 4.3.14, 5.0.3 or later.
What is the CVSS score of CVE-2018-1199?
CVE-2018-1199 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2018-1199?
CVE-2018-1199 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check Maven dependencies for CVE-2018-1199?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.springframework.security'. 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-v596-fwhq-8x48",
  "modified" : "2024-03-15T15:51:03Z",
  "published" : "2018-10-17T20:01:54Z",
  "aliases" : [ "CVE-2018-1199" ],
  "summary" : "Improper Input Validation in org.springframework.security:spring-security-core, org.springframework.security:spring-security-core , and org.springframework:spring-core",
  "details" : "Spring Security (Spring Security 4.1.x before 4.1.5, 4.2.x before 4.2.4, and 5.0.x before 5.0.1; and Spring Framework 4.3.x before 4.3.14 and 5.0.x before 5.0.3) does not consider URL path parameters when processing security constraints. By adding a URL path parameter with special encodings, an attacker may be able to bypass a security constraint. The root cause of this issue is a lack of clarity regarding the handling of path parameters in the Servlet Specification. Some Servlet containers include path parameters in the value returned for getPathInfo() and some do not. Spring Security uses the value returned by getPathInfo() as part of the process of mapping requests to security constraints. In this particular attack, different character encodings used in path parameters allows secured Spring MVC static resource URLs to be bypassed.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.security:spring-security-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.2.0"
      }, {
        "fixed" : "4.2.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.security:spring-security-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.0.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework:spring-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.3.0"
      }, {
        "fixed" : "4.3.14"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework:spring-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.0.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.security:spring-security-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.1.0"
      }, {
        "fixed" : "4.1.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-1199"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-framework/commit/554662ebab87af97ba25d0c9f5449c7acda8df9c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-framework/commit/73a81f98d40eb6f5faa91aceb868db53fae2a94b"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-framework/commit/e6e6b8f4adcad99d133de97fcfac5ae5dd14153c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-security/commit/0eef5b4b425ab42b9fa0fde1a3f36a37b92558f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-security/commit/65da28e4bf62f58fb130ba727cbbd621b44a36d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-security/commit/cb8041ba67635edafcc934498ef82707157fd22"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2018:2405"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-v596-fwhq-8x48"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/4ed49b103f64a0cecb38064f26cbf1389afc12124653da2d35166dbe@%3Cissues.activemq.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/ab825fcade0b49becfa30235b3d54f4a51bb74ea96b6c9adb5d1378c@%3Cissues.activemq.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/dcf8599b80e43a6b60482607adb76c64672772dc2d9209ae2170f369@%3Cissues.activemq.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://pivotal.io/security/cve-2018-1199"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujul2020.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:56:46Z",
    "nvd_published_at" : "2018-03-16T20:29:00Z"
  }
}