CVE-2017-8039: Spring Framework Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-q4v9-qjmw-j7vf
CVSS 5.9
CWE-1188
Published
Advisory Summary

CVE-2017-8039 is a MODERATE (CVSS 5.9) remote code execution vulnerability (CWE-1188: Initialization of a Resource with an Insecure Default) affecting Spring Framework libraries in the Maven ecosystem. The issue involves insecure default initialization of resource in pivotal spring web flow. Remediation is available by upgrading affected packages to version 2.4.6.

CVE-2017-8039 at a Glance

CVE Identifier CVE-2017-8039
GHSA Identifier GHSA-q4v9-qjmw-j7vf
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-1188: Initialization of a Resource with an Insecure Default
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:N/I:H/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 None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2017-8039

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.webflow:spring-webflow fixed: 2.4.6
<dependency>
    <groupId>org.springframework.webflow</groupId>
    <artifactId>spring-webflow</artifactId>
    <version>2.4.6</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.webflow

How to Check if You Are Affected

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

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

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

Note: The mvn dependency:tree -Dincludes=org.springframework.webflow 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-1188: Initialization of a Resource with an Insecure Default, where the product initializes or sets a resource with a default that is intended to be changed by the product's installer, administrator, or maintainer, but the default is not secure. 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

An issue was discovered in Pivotal Spring Web Flow through 2.4.5. Applications that do not change the value of the MvcViewFactoryCreator useSpringBinding property which is disabled by default (i.e., set to 'false') can be vulnerable to malicious EL expressions in view states that process form submissions but do not have a sub-element to declare explicit data binding property mappings. NOTE: this issue exists because of an incomplete fix for CVE-2017-4971.

CVE-2017-8039 Affected Spring Framework Versions

1 component(s)
Fixed Versions:
2.4.6
Product / Package Ecosystem Affected Versions Fixed Version
org.springframework.webflow:spring-webflow
Maven
< 2.4.6
2.4.6

References

Frequently Asked Questions

What is CVE-2017-8039?
CVE-2017-8039 is a security vulnerability in Spring Framework involving Insecure Default Initialization of Resource in Pivotal Spring Web Flow under CWE-1188: Initialization of a Resource with an Insecure Default.
Which Spring Framework versions are affected?
Affected versions include releases prior to 2.4.6 across affected packages: org.springframework.webflow:spring-webflow.
What version fixes CVE-2017-8039?
Upgrading to 2.4.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is spring-webflow affected?
Yes, org.springframework.webflow:spring-webflow is affected in releases prior to 2.4.6. Upgrade your dependency to 2.4.6 or later.
What is the CVSS score of CVE-2017-8039?
CVE-2017-8039 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:N/I:H/A:N.
What CWE is associated with CVE-2017-8039?
CVE-2017-8039 is classified under CWE-1188: Initialization of a Resource with an Insecure Default (The product initializes or sets a resource with a default that is intended to be changed by the product's installer, administrator, or maintainer, but the default is not secure.).
How can I check Maven dependencies for CVE-2017-8039?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.springframework.webflow'. 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-q4v9-qjmw-j7vf",
  "modified" : "2022-06-30T21:13:17Z",
  "published" : "2022-05-13T01:47:15Z",
  "aliases" : [ "CVE-2017-8039" ],
  "summary" : "Insecure Default Initialization of Resource in Pivotal Spring Web Flow",
  "details" : "An issue was discovered in Pivotal Spring Web Flow through 2.4.5. Applications that do not change the value of the MvcViewFactoryCreator useSpringBinding property which is disabled by default (i.e., set to 'false') can be vulnerable to malicious EL expressions in view states that process form submissions but do not have a sub-element to declare explicit data binding property mappings. NOTE: this issue exists because of an incomplete fix for CVE-2017-4971.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.webflow:spring-webflow"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.4.6"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.4.5"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-8039"
  }, {
    "type" : "WEB",
    "url" : "https://pivotal.io/security/cve-2017-8039"
  }, {
    "type" : "WEB",
    "url" : "http://www.securityfocus.com/bid/100849"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1188" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-30T21:13:17Z",
    "nvd_published_at" : "2017-11-27T10:29:00Z"
  }
}