CVE-2020-17521: Groovy Information Disclosure Vulnerability
MODERATECVE-2020-17521 is a MODERATE (CVSS 5.5) information disclosure vulnerability (CWE-379: Creation of Temporary File in Directory with Insecure Permissions) affecting Groovy libraries in the Maven ecosystem. The issue involves information disclosure in apache groovy. Remediation is available by upgrading affected packages to version 2.4.21, 2.5.14, 3.0.7.
CVE-2020-17521 at a Glance
Security Impact
CVSS: 5.5
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:N/A:N).
How to Fix CVE-2020-17521
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.
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<version>2.4.21</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<version>2.5.14</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<version>3.0.7</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.4.21</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.5.14</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>3.0.7</version>
</dependency>
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-2020-17521, 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.21), 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-379: Creation of Temporary File in Directory with Insecure Permissions, where the product creates a temporary file in a directory whose permissions allow unintended actors to determine the file's existence or otherwise access that file. 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
CVE-2020-17521 Affected Groovy Versions
6 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.codehaus.groovy:groovy
|
Maven |
≥ 2.0.0
< 2.4.21
|
2.4.21
|
|
org.codehaus.groovy:groovy
|
Maven |
≥ 2.5.0
< 2.5.14
|
2.5.14
|
|
org.codehaus.groovy:groovy
|
Maven |
≥ 3.0.0
< 3.0.7
|
3.0.7
|
|
org.codehaus.groovy:groovy-all
|
Maven |
≥ 2.0.0
< 2.4.21
|
2.4.21
|
|
org.codehaus.groovy:groovy-all
|
Maven |
≥ 2.5.0
< 2.5.14
|
2.5.14
|
|
org.codehaus.groovy:groovy-all
|
Maven |
≥ 3.0.0
< 3.0.7
|
3.0.7
|
References
Frequently Asked Questions
What is CVE-2020-17521?
Which Groovy versions are affected?
What version fixes CVE-2020-17521?
Is groovy affected?
Is groovy-all affected?
What is the CVSS score of CVE-2020-17521?
What CWE is associated with CVE-2020-17521?
How can I check Maven dependencies for CVE-2020-17521?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rcjj-h6gh-jf3r",
"modified" : "2024-10-17T16:18:50Z",
"published" : "2020-12-09T19:03:03Z",
"aliases" : [ "CVE-2020-17521" ],
"summary" : "Information Disclosure in Apache Groovy",
"details" : "Apache Groovy provides extension methods to aid with creating temporary directories. Prior to this fix, Groovy's implementation of those extension methods was using a now superseded Java JDK method call that is potentially not secure on some operating systems in some contexts. Users not using the extension methods mentioned in the advisory are not affected, but may wish to read the advisory for further details. Versions Affected: 2.0 to 2.4.20, 2.5.0 to 2.5.13, 3.0.0 to 3.0.6, and 4.0.0-alpha-1. Fixed in versions 2.4.21, 2.5.14, 3.0.7, 4.0.0-alpha-2.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.codehaus.groovy:groovy"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.4.21"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.codehaus.groovy:groovy"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.5.0"
}, {
"fixed" : "2.5.14"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.codehaus.groovy:groovy"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.0.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.codehaus.groovy:groovy-all"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.4.21"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.codehaus.groovy:groovy-all"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.5.0"
}, {
"fixed" : "2.5.14"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.codehaus.groovy:groovy-all"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.0.7"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-17521"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/groovy/pull/1425"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/groovy/commit/bcbe5c4c76db83736166530647c024ac1e47ef28"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/groovy"
}, {
"type" : "WEB",
"url" : "https://groovy-lang.org/security.html#CVE-2020-17521"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r4b2f13c302eec98838ff7475253091fb9b75bc1038016ba00ebf6c08@%3Cdev.atlas.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/ra9dab34bf8625511f23692ad0fcee2725f782e9aad6c5cdff6cf4465@%3Cnotifications.groovy.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/rea63a4666ba245d2892471307772a2d8ce0f0741f341d6576625c1b3@%3Cdev.atlas.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20201218-0006"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com//security-alerts/cpujul2021.html"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpuApr2021.html"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpuapr2022.html"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpujan2021.html"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpujan2022.html"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpujul2022.html"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpuoct2021.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-379" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-12-09T19:02:34Z",
"nvd_published_at" : "2020-12-07T20:15:00Z"
}
}