# CVE-2020-1945: Sensitive Data Exposure in Apache Ant

> Apache Ant leaks sensitive data via shared temp directories and allows source file injection, impacting build integrity and confidentiality.

- **Severity:** Medium 6.3 (`CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 May 2020
- **Updated:** 4 Aug 2024
- **Also known as:** CLEANSTART-2025-RL13274, DEBIAN-CVE-2020-1945, GHSA-4p6w-m9wc-c9c9, MGASA-2020-0237, MINI-56x6-4pm6-mgfh, MINI-fvvf-9gxq-m3g6, MINI-gv9g-5fq4-f6m3, SUSE-SU-2020:1944-1, UBUNTU-CVE-2020-1945, USN-4874-1, openSUSE-SU-2020:1022-1, openSUSE-SU-2024:11676-1

## What is CVE-2020-1945?

CVE-2020-1945 is a medium-severity vulnerability in Canonical Ubuntu Linux, published on 14 May 2020. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

Apache Ant 1.1 to 1.9.14 and 1.10.0 to 1.10.7 uses the default temporary directory identified by the Java system property java.io.tmpdir for several tasks and may thus leak sensitive information. The fixcrlf and replaceregexp tasks also copy files from the temporary directory back into the build tree allowing an attacker to inject modified source files into the build process.

Weakness: CWE-668 (Exposure of Resource to Wrong Sphere)

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

4 open source packages ship an affected version, including org.apache.ant:ant. It affects 50 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.ant:ant` | Maven | From 1.1 | 1.9.15 |
| `org.apache.ant:ant` | Maven | From 1.1 | 1.9.15 |
| `org.apache.ant:ant` | Maven | From 1.10.0 | 1.10.8 |
| `org.apache.ant:ant` | Maven | From 1.10.0 | 1.10.8 |
| `ant` | SUSE:Linux Enterprise Module for Development Tools 15 SP2 | All versions | 1.10.7-4.3.1 |
| `ant-antlr` | SUSE:Linux Enterprise Module for Development Tools 15 SP2 | All versions | 1.10.7-4.3.1 |
| `ant-junit` | SUSE:Linux Enterprise Module for Development Tools 15 SP2 | All versions | 1.10.7-4.3.1 |
| `ant` | openSUSE:Leap 15.2 | All versions | 1.10.7-lp152.2.3.1 |
| `ant-antlr` | openSUSE:Leap 15.2 | All versions | 1.10.7-lp152.2.3.1 |
| `ant-junit` | openSUSE:Leap 15.2 | All versions | 1.10.7-lp152.2.3.1 |
| `ant-junit5` | openSUSE:Leap 15.2 | All versions | 1.10.7-lp152.2.3.1 |
| `junit` | openSUSE:Tumbleweed | All versions | 4.13.2-1.1 |

Products: Apache Ant, Canonical Ubuntu Linux, Fedoraproject Fedora, Opensuse Leap, Oracle Agile Engineering Data Management, Oracle Banking Enterprise Collections, Oracle Banking Liquidity Management, Oracle Banking Platform, Oracle Business Process Management Suite, Oracle Category Management Planning \& Optimization, Oracle Communications Asap, Oracle Communications Diameter Signaling Router, Oracle Communications Metasolv Solution, Oracle Communications Order and Service Management, Oracle Data Integrator, Oracle Endeca Information Discovery Studio, Oracle Enterprise Manager Ops Center, Oracle Enterprise Repository, Oracle Financial Services Analytical Applications Infrastructure, Oracle Flexcube Investor Servicing and 30 more.

## How do I fix CVE-2020-1945?

Upgrade org.apache.ant:ant to a fixed version for your release line: 1.9.15 or 1.10.8.

## Is CVE-2020-1945 being exploited?

There is no known exploitation of CVE-2020-1945 in the wild and no public exploit code.

## Other vulnerabilities in Canonical Ubuntu Linux

- [CVE-2020-11979](https://insights.sbomify.com/CVE-2020-11979/): Code injection in Apache Ant (high 7.5)
- [CVE-2026-78254](https://insights.sbomify.com/CVE-2026-78254/): Apache Ant: Path traversal in ftp and scp tasks allows arbitrary file write (high 7.4)
- [CVE-2021-36373](https://insights.sbomify.com/CVE-2021-36373/): Apache Ant TAR archive denial of service vulnerability (medium 5.5)
- [CVE-2021-36374](https://insights.sbomify.com/CVE-2021-36374/): Apache Ant ZIP, and ZIP based, archive denial of service vulerability (medium 5.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-1945 and fix it if it is affected.

What it is: CVE-2020-1945 is a medium-severity vulnerability in Canonical Ubuntu Linux, published on 14 May 2020. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2020-1945 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.apache.ant:ant (Maven): affected from 1.1; fixed in 1.9.15
- org.apache.ant:ant (Maven): affected from 1.1; fixed in 1.9.15
- org.apache.ant:ant (Maven): affected from 1.10.0; fixed in 1.10.8
- org.apache.ant:ant (Maven): affected from 1.10.0; fixed in 1.10.8

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2020-1945/ (Markdown: https://insights.sbomify.com/CVE-2020-1945/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2020-1945
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2020-1945
- OSV: https://osv.dev/vulnerability/CVE-2020-1945

---
From sbomify Insights: https://insights.sbomify.com/CVE-2020-1945/
Summaries are generated and may contain mistakes; the official description above is the record.
