Arbitrary Code Injection Affecting org.apache.ant:ant package, versions [,1.10.9)



    Attack Complexity High
    User Interaction Required
Expand this section
6.2 medium
Expand this section
7.5 high

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • published 2 Oct 2020
  • disclosed 2 Oct 2020
  • credit Unknown

How to fix?

Upgrade org.apache.ant:ant to version 1.10.9 or higher.


org.apache.ant:ant is a software tool for automating software build processes which originated from the Apache Tomcat project in early 2000.

Affected versions of this package are vulnerable to Arbitrary Code Injection. As mitigation for CVE-2020-1945 Apache Ant 1.10.8 changed the permissions of temporary files it created so that only the current user was allowed to access them. Unfortunately the fixcrlf task deleted the temporary file and created a new one without said protection, effectively nullifying the effort. This would still allow an attacker to inject modified source files into the build process.

Alternative Mitigation:

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

Ant users of versions 1.10.8 and 1.9.15 can use the Ant property ant.tmpdir to point to such a directory, users of versions 1.1 to 1.9.14 and 1.10.0 to 1.10.7 should set the system property. This mitigation is external to the product.