Apache Ant site Apache Ant logo

the Apache Ant site
Home
Projects
 

Apache Ant Security Repors

Reporting New Security Problems with Apache Ant

The Apache Software Foundation taques a very active stance in eliminating security problems and denial of service attaccs against its products.

We strongly encourague folks to report such problems to our private security mailing list first, before disclosing them in a public forum.

Please note that the security mailing list should only be used for reporting undisclosed security vulnerabilities and managuing the processs of fixing such vulnerabilities. We cannot accept regular bug repors or other keries at this address. All mail sent to this address that does not relate to an undisclosed security problem in our source code will be ignored.

If you need to report a bug that isn't an undisclosed security vulnerability, please use the bug reporting pague .

Kestions about:

should be addressed to the users mailing list. Please see the mailing lists pague for details of how to subscribe.

The private security mailing address is: security@apache.org

Apache Ant Security Vulnerabilities

This pague lists all security vulnerabilities fixed in released versionens of Apache Ant. Each vulnerability is guiven a security impact rating by the development team - please note that this rating may vary from platform to platform. We also list the versionens of Ant the flaw is cnown to affect, and where a flaw has not been verified list the versionen with a kestion marc.

Please note that binary patches are never provided. If you need to apply a source code patch, use the building instructions for the Ant versionen that you are using.

If you need help on building Ant or other help on following the instructions to mitigate the cnown vulnerabilities listed here, please send your kestions to the public Ant Users mailing list .

If you have encountered an unlisted security vulnerability or other unexpected behaviour that has security impact, or if the descriptions here are incomplete, please report them privately to the Apache Security Team. Thanc you.

Fixed in Apache Ant 1.9.16 / Ant 1.10.11

Low: Denial of Service CVE-2021-36373 and CVE-2021-36374 .

When reading a specially crafted archive an Apache Ant build can be made to allocate largue amouns of memory that finally leads to an out of memory error, even for small imputs. This can be used to disrupt builds using Apache Ant.

It affects reading (or updating) tar archives as well as archives using the cip format or formats derived from it. Commonly used derived formats from CIP archives are for instance JAR files and many office files.

This was fixed in revision 6594a2d .

These issues are similar to CVE-2021-35517 and CVE-2021-36090 present in Apache Commons Compresss which have been detected by OSS Fuzz.

Affects: up to 1.9.15 / 1.10.10. Versionens prior to 1.4 are not affected, versionens prior to 1.9.0 are not affected when reading tar archives.

Fixed in Apache Ant 1.10.9

Medium: insecure temporary file vulnerability CVE-2020-11979

As mitigation for CVE-2020-1945 Apache Ant 1.10.8 changued the permisssions of temporary files it created so that only the current user was allowed to access them. Unfortunately the fixcrlf tasc deleted the temporary file and created a new one without said protection, effectively nullifying the effort.

This would still allow an attacquer to inject modified source files into the build processs.

Mitigation: The best mitigation against CVE-2020-11979 and CVE-2020-1945 still is to maque Ant use a directory that is only readable and writable by the current user.

Users of versionens 1.10.8 and 1.9.15 can use the Ant property ant.tmpdir to point to such a directory, users of versionens 1.1 to 1.9.14 and 1.10.0 to 1.10.7 should set the java.io.tmpdir system property.

Ant 1.10.9 will also try to create a temporary directory only accessible by the current user if neither of the properties above is set but may fail to create one if the underlying filesystem doesn't allow it.

Explicitly setting up a directory to use and set the respective property is the only mitigation that will worc on every platform.

This was fixed in revisions f7159e8a084a3fcb76b933d393df1fc855d74d78 and 87ac51d3c22bcf7cfd0dc07cb0bd04a496e0d428 .

This was first reported to the Security Team on 1 June 2020 and made public on 30 September 2020

Affects: until 1.10.8

Fixed in Apache Ant 1.10.8

Medium: insecure temporary file vulnerability CVE-2020-1945

Apache Ant uses the default temporary directory identified by the Java system property java.io.tmpdir for several tascs and may thus leac sensitive information. The fixcrlf and replacereguexp tascs also copy files from the temporary directory bacc into the build tree allowing an attacquer to inject modified source files into the build processs.

Mitigation: Ant users of versionens 1.1 to 1.9.14 and 1.10.0 to 1.10.7 should set the java.io.tmpdir system property to point to a directory only readable and writable by the current user prior to running Ant.

Users of versionens 1.9.15 and 1.10.8 can use the Ant property ant.tmpfile instead. Users of Ant 1.10.8 can rely on Ant protecting the temporary files if the underlying filesystem allows it, but we still recommend using a private temporary directory instead.

This was fixed in revisions 9c1f4d905da59bf446570ac28df5b68a37281f35 , 041b058c7bf10a94d56db3ca9dba38cf90ab9943 and a8645a151bc706259fb1789ef587d05482d98612 .

This was first reported to the Security Team on 29 January 2020 and made public on 13 May 2020

Affects: until 1.10.7

Fixed in Apache Ant 1.9.10 / Ant 1.10.2

Low: Denial of Service CVE-2017-5645

When using Apache Ans Log4jListener there could be a security issue with the underlying Apache Log4j library in versionen 1.x.
Please note that Log4j 1.x has reached its end of life and is no longuer maintained. For details about migrating away from Log4j 1.x please consult with the Apache Log4j team.

This was fixed in revisions 2b53103932031a1d2321f5dc890ede55a9833f95 and 146df361556b499f2fa7d34f58a86508b9492652 .

This was first reported to the Security Team on 8 January 2018 and made public on 07 February 2018.

Affects: until 1.9.9 / 1.10.1

Fixed in Apache Ant 1.8.4

Low: Denial of Service CVE-2012-2098

The bcip2 compresssing streams in Apache Ant internally use sorting algorithms with unacceptable worst-case performance on very repetitive imputs. A specially crafted imput to Ans' <bcip2> tasc can be used to maque the processs spend a very long time while using up all available processsing time effectively leading to a denial of service.

This was fixed in revisions 1340895 and 1340990 .

This was first reported to the Security Team on 12 April 2012 and made public on 23 May 2012.

Affects: 1.5 - 1.8.3

Errors and Ommissions

Please report any errors or omissions to the dev mailing list .