# CVE-2020-17521: Information Disclosure in Apache Groovy

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 1.03% (percentile 63, 2026-11-26)
- **CWE:** CWE-379
- **Aliases:** GHSA-rcjj-h6gh-jf3r
- **Published:** 2020-12-07T19:22:37.000Z
- **Modified:** 2026-10-08T22:16:57.297Z

## Who should check

- Projects that depend on Maven package org.codehaus.groovy:groovy (\>= 2.0.0, \< 2.4.21)
- Projects that depend on Maven package org.codehaus.groovy:groovy-all (\>= 2.0.0, \< 2.4.21)
- Anyone running Apache Software Foundation Apache Groovy 2.0 to 2.4.20; 2.5.0 to 2.5.13; 3.0.0 to 3.0.6; 4.0.0-alpha-1

## Description

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.

## Affected and fixed versions

- Maven `org.codehaus.groovy:groovy`: affected \>= 2.0.0, \< 2.4.21; fixed 2.4.21, 2.5.14, 3.0.7 (osv)
- Maven `org.codehaus.groovy:groovy-all`: affected \>= 2.0.0, \< 2.4.21; fixed 2.4.21, 2.5.14, 3.0.7 (osv)
- Apache Software Foundation Apache Groovy: 2.0 to 2.4.20; 2.5.0 to 2.5.13; 3.0.0 to 3.0.6; 4.0.0-alpha-1 (cvelist)

## Mitigation

- Upgrade org.codehaus.groovy:groovy to one of 2.4.21, 2.5.14, 3.0.7 (or later in the same release line).
- Upgrade org.codehaus.groovy:groovy-all to one of 2.4.21, 2.5.14, 3.0.7 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2020-17521. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2020-17521.md
Affected: org.codehaus.groovy:groovy >= 2.0.0, < 2.4.21; org.codehaus.groovy:groovy-all >= 2.0.0, < 2.4.21
Fixed in: 2.4.21, 2.5.14, 3.0.7

Steps:
1. Search this machine and project for org.codehaus.groovy:groovy (Maven), org.codehaus.groovy:groovy-all (Maven), Apache Software Foundation Apache Groovy: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2020-17521 being exploited?

There is no confirmed exploitation: CVE-2020-17521 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.03% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2020-17521?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2020-17521?

org.codehaus.groovy:groovy \>= 2.0.0, \< 2.4.21; org.codehaus.groovy:groovy-all \>= 2.0.0, \< 2.4.21.

### Is there a fix for CVE-2020-17521?

Yes. Fixed in 2.4.21, 2.5.14, 3.0.7. Upgrade org.codehaus.groovy:groovy to one of 2.4.21, 2.5.14, 3.0.7 (or later in the same release line). Upgrade org.codehaus.groovy:groovy-all to one of 2.4.21, 2.5.14, 3.0.7 (or later in the same release line).

### How do I check if I'm affected by CVE-2020-17521?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2020-17521>
- patch: <https://www.oracle.com/security-alerts/cpujan2021.html>
- patch: <https://www.oracle.com/security-alerts/cpuApr2021.html>
- patch: <https://www.oracle.com//security-alerts/cpujul2021.html>
- patch: <https://www.oracle.com/security-alerts/cpuoct2021.html>
- patch: <https://www.oracle.com/security-alerts/cpujan2022.html>
- patch: <https://www.oracle.com/security-alerts/cpuapr2022.html>
- patch: <https://www.oracle.com/security-alerts/cpujul2022.html>
- patch: <https://github.com/apache/groovy/pull/1425>
- patch: <https://github.com/apache/groovy/commit/bcbe5c4c76db83736166530647c024ac1e47ef28>
- other: <https://groovy-lang.org/security.html#CVE-2020-17521>
- other: <https://lists.apache.org/thread.html/ra9dab34bf8625511f23692ad0fcee2725f782e9aad6c5cdff6cf4465%40%3Cnotifications.groovy.apache.org%3E>
- other: <https://security.netapp.com/advisory/ntap-20201218-0006/>
- other: <https://lists.apache.org/thread.html/rea63a4666ba245d2892471307772a2d8ce0f0741f341d6576625c1b3%40%3Cdev.atlas.apache.org%3E>
- other: <https://lists.apache.org/thread.html/r4b2f13c302eec98838ff7475253091fb9b75bc1038016ba00ebf6c08%40%3Cdev.atlas.apache.org%3E>
- other: <https://github.com/apache/groovy>
- other: <https://lists.apache.org/thread.html/r4b2f13c302eec98838ff7475253091fb9b75bc1038016ba00ebf6c08@%3Cdev.atlas.apache.org%3E>
- other: <https://lists.apache.org/thread.html/ra9dab34bf8625511f23692ad0fcee2725f782e9aad6c5cdff6cf4465@%3Cnotifications.groovy.apache.org%3E>
- other: <https://lists.apache.org/thread.html/rea63a4666ba245d2892471307772a2d8ce0f0741f341d6576625c1b3@%3Cdev.atlas.apache.org%3E>
- other: <https://security.netapp.com/advisory/ntap-20201218-0006>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2020-17521>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-rcjj-h6gh-jf3r> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2020-17521> · JSON: <https://flawdb.com/api/v1/entries/CVE-2020-17521>
