CVE-2018-11040: Spring Framework Spring-core Vulnerability

MODERATE
Advisory Identifier: GHSA-f26x-pr96-vw86
CVSS 5.9
CWE-829
Published
Advisory Summary

CVE-2018-11040 is a MODERATE (CVSS 5.9) spring-core vulnerability (CWE-829: Inclusion of Functionality from Untrusted Control Sphere) affecting Spring Framework libraries in the Maven ecosystem. The issue involves spring-core. Remediation is available by upgrading affected packages to version 5.0.7.RELEASE, 4.3.18.RELEASE.

CVE-2018-11040 at a Glance

CVE Identifier CVE-2018-11040
GHSA Identifier GHSA-f26x-pr96-vw86
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-829: Inclusion of Functionality from Untrusted Control Sphere
Affected Product Spring Framework
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 5.9

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

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

How to Fix CVE-2018-11040

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.7.RELEASE
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-core</artifactId>
    <version>5.0.7.RELEASE</version>
</dependency>
org.springframework:spring-core fixed: 4.3.18.RELEASE
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-core</artifactId>
    <version>4.3.18.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-11040, 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.7.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-829: Inclusion of Functionality from Untrusted Control Sphere, where the product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere. 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, versions 5.0.x prior to 5.0.7 and 4.3.x prior to 4.3.18 and older unsupported versions, allows web applications to enable cross-domain requests via JSONP (JSON with Padding) through AbstractJsonpResponseBodyAdvice for REST controllers and MappingJackson2JsonView for browser requests. Both are not enabled by default in Spring Framework nor Spring Boot, however, when MappingJackson2JsonView is configured in an application, JSONP support is automatically ready to use through the "jsonp" and "callback" JSONP parameters, enabling cross-domain requests.

CVE-2018-11040 Affected Spring Framework Versions

2 component(s)
Fixed Versions:
5.0.7.RELEASE4.3.18.RELEASE
Product / Package Ecosystem Affected Versions Fixed Version
org.springframework:spring-core
Maven
≥ 5.0.0.RELEASE
< 5.0.7.RELEASE
5.0.7.RELEASE
org.springframework:spring-core
Maven
≥ 4.3.0.RELEASE
< 4.3.18.RELEASE
4.3.18.RELEASE

References

NVD — CVE-2018-11040 NVD
https://nvd.nist.gov/vuln/detail/CVE-2018-11040
Security Fix Commit FIX COMMIT
https://github.com/spring-projects/spring-framework/commit/874859493bbda59739c38c7e52eb3625f247b93a
Security Fix Commit FIX COMMIT
https://github.com/spring-projects/spring-framework/commit/b80c13b722bb207ddf43f53a007ee3ddc1dd2e26
GitHub Advisory / Wiki ADVISORY
https://github.com/advisories/GHSA-f26x-pr96-vw86
Spring Framework Source Repository REPOSITORY
https://github.com/spring-projects/spring-framework
lists.debian.org/debian-lts-announce... WEB
https://lists.debian.org/debian-lts-announce/2021/04/msg00022.html
Spring Framework Security Information SECURITY
https://pivotal.io/security/cve-2018-11040
Spring Framework Security Information SECURITY
https://www.oracle.com/security-alerts/cpujan2020.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/cpuoct2021.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/technetwork/security-advisory/cpujan2019-5072801.html
Spring Framework Security Information SECURITY
https://www.oracle.com/technetwork/security-advisory/cpujul2019-5072835.html
Spring Framework Security Information SECURITY
http://www.oracle.com/technetwork/security-advisory/cpuoct2018-4428296.html

Frequently Asked Questions

What is CVE-2018-11040?
CVE-2018-11040 is a security vulnerability in Spring Framework involving spring-core under CWE-829: Inclusion of Functionality from Untrusted Control Sphere.
Which Spring Framework versions are affected?
Affected versions include releases prior to 5.0.7.RELEASE, 4.3.18.RELEASE across affected packages: org.springframework:spring-core.
What version fixes CVE-2018-11040?
Upgrading to 5.0.7.RELEASE, 4.3.18.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.7.RELEASE, 4.3.18.RELEASE. Upgrade your dependency to 5.0.7.RELEASE, 4.3.18.RELEASE or later.
What is the CVSS score of CVE-2018-11040?
CVE-2018-11040 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2018-11040?
CVE-2018-11040 is classified under CWE-829: Inclusion of Functionality from Untrusted Control Sphere (The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.).
How can I check Maven dependencies for CVE-2018-11040?
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-f26x-pr96-vw86",
  "modified" : "2024-05-15T06:25:53Z",
  "published" : "2018-10-16T17:43:45Z",
  "aliases" : [ "CVE-2018-11040" ],
  "summary" : "Moderate severity vulnerability that affects org.springframework:spring-core",
  "details" : "Spring Framework, versions 5.0.x prior to 5.0.7 and 4.3.x prior to 4.3.18 and older unsupported versions, allows web applications to enable cross-domain requests via JSONP (JSON with Padding) through AbstractJsonpResponseBodyAdvice for REST controllers and MappingJackson2JsonView for browser requests. Both are not enabled by default in Spring Framework nor Spring Boot, however, when MappingJackson2JsonView is configured in an application, JSONP support is automatically ready to use through the \"jsonp\" and \"callback\" JSONP parameters, enabling cross-domain requests.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework:spring-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0.RELEASE"
      }, {
        "fixed" : "5.0.7.RELEASE"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework:spring-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.3.0.RELEASE"
      }, {
        "fixed" : "4.3.18.RELEASE"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-11040"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-framework/commit/874859493bbda59739c38c7e52eb3625f247b93a"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-framework/commit/b80c13b722bb207ddf43f53a007ee3ddc1dd2e26"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-f26x-pr96-vw86"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/spring-projects/spring-framework"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2021/04/msg00022.html"
  }, {
    "type" : "WEB",
    "url" : "https://pivotal.io/security/cve-2018-11040"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujan2020.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujul2020.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuoct2021.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/technetwork/security-advisory/cpuapr2019-5072813.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/technetwork/security-advisory/cpujan2019-5072801.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/technetwork/security-advisory/cpujul2019-5072835.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.oracle.com/technetwork/security-advisory/cpuoct2018-4428296.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-829" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:33:24Z",
    "nvd_published_at" : "2018-06-25T15:29:00Z"
  }
}