CVE-2020-15777: Gradle enterprise maven extension Maven Extension Plugin For Gradle Vulnerability

HIGH
Advisory Identifier: GHSA-vp55-fhxx-vcx8
CVSS 7.8
CWE-502
Published
Advisory Summary

CVE-2020-15777 is a HIGH (CVSS 7.8) maven extension plugin for gradle vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Gradle enterprise maven extension libraries in the Maven ecosystem. The issue involves maven extension plugin for gradle enterprise vulnerable to deserialization of untrusted data. Remediation is available by upgrading affected packages to version 1.6.

CVE-2020-15777 at a Glance

CVE Identifier CVE-2020-15777
GHSA Identifier GHSA-vp55-fhxx-vcx8
Severity HIGH
CVSS v3.1 Base Score 7.8
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Gradle enterprise maven extension
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.8

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

Attack Vector Local (AV:L)
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-2020-15777

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

com.gradle:gradle-enterprise-maven-extension fixed: 1.6
<dependency>
    <groupId>com.gradle</groupId>
    <artifactId>gradle-enterprise-maven-extension</artifactId>
    <version>1.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=com.gradle

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=com.gradle

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

Note: The mvn dependency:tree -Dincludes=com.gradle 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-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Gradle enterprise maven extension, 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 the Maven Extension plugin before 1.6 for Gradle Enterprise. It is vulnerable to, in the worst case, Remote Code Execution, and in the general case, local privilege escalation. Internally, the plugin uses a socket connection to send serialized Java objects that are deserialized by a Java standard library ObjectInputStream. This ObjectInputStream was not restricted to a list of trusted classes, thus allowing an attacker to send a malicious deserialization gadget chain to achieve code execution. The socket was not bound exclusively to localhost. The port this socket is assigned to is randomly selected by the JVM and is not intentionally exposed to the public (either by design or documentation).

CVE-2020-15777 Affected Gradle enterprise maven extension Versions

1 component(s)
Fixed Versions:
1.6
Product / Package Ecosystem Affected Versions Fixed Version
com.gradle:gradle-enterprise-maven-extension
Maven
< 1.6
1.6

References

Frequently Asked Questions

What is CVE-2020-15777?
CVE-2020-15777 is a security vulnerability in Gradle enterprise maven extension involving Maven Extension plugin for Gradle Enterprise vulnerable to Deserialization of Untrusted Data under CWE-502: Deserialization of Untrusted Data.
Which Gradle enterprise maven extension versions are affected?
Affected versions include releases prior to 1.6 across affected packages: com.gradle:gradle-enterprise-maven-extension.
What version fixes CVE-2020-15777?
Upgrading to 1.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is gradle-enterprise-maven-extension affected?
Yes, com.gradle:gradle-enterprise-maven-extension is affected in releases prior to 1.6. Upgrade your dependency to 1.6 or later.
What is the CVSS score of CVE-2020-15777?
CVE-2020-15777 has a CVSS v3.1 base score of 7.8 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2020-15777?
CVE-2020-15777 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check Maven dependencies for CVE-2020-15777?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.gradle'. 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-vp55-fhxx-vcx8",
  "modified" : "2023-05-16T17:57:47Z",
  "published" : "2022-05-24T17:26:39Z",
  "aliases" : [ "CVE-2020-15777" ],
  "summary" : "Maven Extension plugin for Gradle Enterprise vulnerable to Deserialization of Untrusted Data",
  "details" : "An issue was discovered in the Maven Extension plugin before 1.6 for Gradle Enterprise. It is vulnerable to, in the worst case, Remote Code Execution, and in the general case, local privilege escalation. Internally, the plugin uses a socket connection to send serialized Java objects that are deserialized by a Java standard library ObjectInputStream. This ObjectInputStream was not restricted to a list of trusted classes, thus allowing an attacker to send a malicious deserialization gadget chain to achieve code execution. The socket was not bound exclusively to localhost. The port this socket is assigned to is randomly selected by the JVM and is not intentionally exposed to the public (either by design or documentation).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.gradle:gradle-enterprise-maven-extension"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-15777"
  }, {
    "type" : "WEB",
    "url" : "https://docs.gradle.com/enterprise/maven-extension/#1_6"
  }, {
    "type" : "WEB",
    "url" : "https://docs.gradle.com/enterprise/maven-extension/#release_history"
  }, {
    "type" : "WEB",
    "url" : "https://security.gradle.com/advisory/CVE-2020-15777"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-05-16T17:57:47Z",
    "nvd_published_at" : "2020-08-25T22:15:00Z"
  }
}