CVE-2020-1945: Medium severity Apache Ant vulnerability
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.
Other sources
Apache Ant could allow a remote attacker to bypass security restrictions, caused by the use of an insecure temporary directory to store source files. By sending a specially-crafted request, an attacker could exploit this vulnerability to obtain sensitive information and inject modified source files into the build process.
— IBM
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/jenkinsto a version that resolves this vulnerability.Fixed in 0:2.263.3.1612433584-1.el7 - Upgrade
Upgrade
redhat/conmonto a version that resolves this vulnerability.Fixed in 2:2.0.21-1.rhaos4.5.el8 - Upgrade
Upgrade
redhat/jenkinsto a version that resolves this vulnerability.Fixed in 0:2.263.3.1612434332-1.el7 - Upgrade
Upgrade
redhat/machine-config-daemonto a version that resolves this vulnerability.Fixed in 0:4.5.0-202102050524.p0.git.2594.ff3b8c0.el8 - Upgrade
Upgrade
redhat/openshiftto a version that resolves this vulnerability.Fixed in 0:4.5.0-202102050524.p0.git.0.9229406.el7 - Upgrade
Upgrade
redhat/openshift-ansibleto a version that resolves this vulnerability.Fixed in 0:4.5.0-202102031005.p0.git.0.c6839a2.el7 - Upgrade
Upgrade
redhat/openshift-clientsto a version that resolves this vulnerability.Fixed in 0:4.5.0-202102051529.p0.git.3612.61b096a.el7 - Upgrade
Upgrade
redhat/runcto a version that resolves this vulnerability.Fixed in 0:1.0.0-72.rhaos4.5.giteadfc6b.el8 - Upgrade
Upgrade
redhat/jenkinsto a version that resolves this vulnerability.Fixed in 0:2.263.3.1612434510-1.el8 - Upgrade
Upgrade
debian/antto a version that resolves this vulnerability.Fixed in 1.10.9-4Fixed in 1.10.13-1Fixed in 1.10.15-1 - Upgrade
Upgrade
redhat/antto a version that resolves this vulnerability.Fixed in 1.9.15 - Upgrade
Upgrade
redhat/antto a version that resolves this vulnerability.Fixed in 1.10.8 - Configuration
For Apache Ant versions 1.1 to 1.9.14 and 1.10.0 to 1.10.7, set the JVM system property java.io.tmpdir to a private temporary directory (only readable and writable by the current user) before running Ant.
Apache Ant java.io.tmpdir (JVM system property) = private directory (only readable and writable by the current user) - Configuration
For Apache Ant versions 1.9.15 and 1.10.8, use the Ant property ant.tmpfile instead of the default temporary directory.
Apache Ant ant.tmpfile (Ant property) = use Ant property
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the vulnerability ID for this issue?
The vulnerability ID for this issue is CVE-2020-1945.
What is the severity level of CVE-2020-1945?
The severity level of CVE-2020-1945 is medium.
What software versions are affected by CVE-2020-1945?
Apache Ant versions 1.1 to 1.9.14 and 1.10.0 to 1.10.7 are affected by CVE-2020-1945.
How can an attacker exploit CVE-2020-1945?
An attacker can exploit CVE-2020-1945 to bypass security restrictions by using an insecure temporary directory.
How can I fix CVE-2020-1945?
To fix CVE-2020-1945, update Apache Ant to version 1.9.15 or 1.10.8, depending on the version you are using.