CVE-2016-6814: Groovy Deserialization Of Untrusted Data Vulnerability

CRITICAL
Advisory Identifier: GHSA-xphj-m9cc-8fmq
CVSS 9.8
CWE-502
Published
Advisory Summary

CVE-2016-6814 is a CRITICAL (CVSS 9.8) deserialization of untrusted data vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Groovy libraries in the Maven ecosystem. The issue involves deserialization of untrusted data in groovy. Remediation is available by upgrading affected packages to version 2.4.8.

CVE-2016-6814 at a Glance

CVE Identifier CVE-2016-6814
GHSA Identifier GHSA-xphj-m9cc-8fmq
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Groovy
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.8

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

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 High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2016-6814

To remediate this vulnerability, upgrade all affected Groovy 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.codehaus.groovy:groovy fixed: 2.4.8
<dependency>
    <groupId>org.codehaus.groovy</groupId>
    <artifactId>groovy</artifactId>
    <version>2.4.8</version>
</dependency>
org.codehaus.groovy:groovy-all fixed: 2.4.8
<dependency>
    <groupId>org.codehaus.groovy</groupId>
    <artifactId>groovy-all</artifactId>
    <version>2.4.8</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.codehaus.groovy

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.codehaus.groovy

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

Note: The mvn dependency:tree -Dincludes=org.codehaus.groovy 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 Groovy, 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

When an application with unsupported Codehaus versions of Groovy from 1.7.0 to 2.4.3, Apache Groovy 2.4.4 to 2.4.7 on classpath uses standard Java serialization mechanisms, e.g. to communicate between servers or to store local data, it was possible for an attacker to bake a special serialized object that will execute code directly when deserialized. All applications which rely on serialization and do not isolate the code which deserializes objects were subject to this vulnerability.

CVE-2016-6814 Affected Groovy Versions

2 component(s)
Fixed Versions:
2.4.8
Product / Package Ecosystem Affected Versions Fixed Version
org.codehaus.groovy:groovy
Maven
≥ 1.7.0
< 2.4.8
2.4.8
org.codehaus.groovy:groovy-all
Maven
≥ 1.7.0
< 2.4.8
2.4.8

References

NVD — CVE-2016-6814 NVD
https://nvd.nist.gov/vuln/detail/CVE-2016-6814
access.redhat.com/errata/rhsa-2017:08... WEB
https://access.redhat.com/errata/RHSA-2017:0868
access.redhat.com/errata/rhsa-2017:24... WEB
https://access.redhat.com/errata/RHSA-2017:2486
access.redhat.com/errata/rhsa-2017:25... WEB
https://access.redhat.com/errata/RHSA-2017:2596
Groovy Security Information SECURITY
https://security.gentoo.org/glsa/202003-01
Groovy Security Information SECURITY
https://www.oracle.com/security-alerts/cpujan2020.html
Groovy Security Information SECURITY
https://www.oracle.com/security-alerts/cpujul2020.html
Groovy Security Information SECURITY
https://www.oracle.com/technetwork/security-advisory/cpujan2019-5072801.html
Groovy Security Information SECURITY
https://www.oracle.com/technetwork/security-advisory/cpujul2019-5072835.html
Groovy Security Information SECURITY
https://www.oracle.com/technetwork/security-advisory/cpuoct2019-5072832.html
mail-archives.apache.org/mod_mbox/www-announ... WEB
http://mail-archives.apache.org/mod_mbox/www-announce/201701.mbox/%3CCADRx3PMZ2hBCGDTY35zYXFGaDnjAs0tc5-upaVs6QN2sYUejyA%40mail.gmail.com%3E
rhn.redhat.com/errata/rhsa-2017-02... WEB
http://rhn.redhat.com/errata/RHSA-2017-0272.html
Groovy Security Information SECURITY
http://www.oracle.com/technetwork/security-advisory/cpuapr2018-3678067.html
Groovy Security Information SECURITY
http://www.oracle.com/technetwork/security-advisory/cpujul2018-4258247.html
Groovy Security Information SECURITY
http://www.oracle.com/technetwork/security-advisory/cpuoct2018-4428296.html

Frequently Asked Questions

What is CVE-2016-6814?
CVE-2016-6814 is a security vulnerability in Groovy involving Deserialization of Untrusted Data in Groovy under CWE-502: Deserialization of Untrusted Data.
Which Groovy versions are affected?
Affected versions include releases prior to 2.4.8 across affected packages: org.codehaus.groovy:groovy, org.codehaus.groovy:groovy-all.
What version fixes CVE-2016-6814?
Upgrading to 2.4.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is groovy affected?
Yes, org.codehaus.groovy:groovy is affected in releases prior to 2.4.8. Upgrade your dependency to 2.4.8 or later.
Is groovy-all affected?
Yes, org.codehaus.groovy:groovy-all is affected in releases prior to 2.4.8. Upgrade your dependency to 2.4.8 or later.
What is the CVSS score of CVE-2016-6814?
CVE-2016-6814 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2016-6814?
CVE-2016-6814 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-2016-6814?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.codehaus.groovy'. 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-xphj-m9cc-8fmq",
  "modified" : "2024-10-17T16:19:08Z",
  "published" : "2022-05-13T01:25:19Z",
  "aliases" : [ "CVE-2016-6814" ],
  "summary" : "Deserialization of Untrusted Data in Groovy",
  "details" : "When an application with unsupported Codehaus versions of Groovy from 1.7.0 to 2.4.3, Apache Groovy 2.4.4 to 2.4.7 on classpath uses standard Java serialization mechanisms, e.g. to communicate between servers or to store local data, it was possible for an attacker to bake a special serialized object that will execute code directly when deserialized. All applications which rely on serialization and do not isolate the code which deserializes objects were subject to this vulnerability.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.codehaus.groovy:groovy"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.7.0"
      }, {
        "fixed" : "2.4.8"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.4.7"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.codehaus.groovy:groovy-all"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.7.0"
      }, {
        "fixed" : "2.4.8"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.4.7"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-6814"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2017:0868"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2017:2486"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2017:2596"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/202003-01"
  }, {
    "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/technetwork/security-advisory/cpujan2019-5072801.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/technetwork/security-advisory/cpujul2019-5072835.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/technetwork/security-advisory/cpuoct2019-5072832.html"
  }, {
    "type" : "WEB",
    "url" : "http://mail-archives.apache.org/mod_mbox/www-announce/201701.mbox/%3CCADRx3PMZ2hBCGDTY35zYXFGaDnjAs0tc5-upaVs6QN2sYUejyA%40mail.gmail.com%3E"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2017-0272.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.oracle.com/technetwork/security-advisory/cpuapr2018-3678067.html"
  }, {
    "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-502" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-07-06T19:46:12Z",
    "nvd_published_at" : "2018-01-18T18:29:00Z"
  }
}