ArchLinux: 202012-5: ant: arbitrary code execution
Summary
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.
Resolution
Upgrade to 1.10.9-1.
# pacman -Syu "ant>=1.10.9-1"
The problem has been fixed upstream in version 1.10.9.
References
https://lists.apache.org/thread/rc3c8ef9724b5b1e171529b47f4b35cb7920edfb6e917fa21eb6c64ea@%3Cdev.ant.apache.org%3E https://security.archlinux.org/CVE-2020-11979
Workaround
The issue can be mitigated by making Ant use a directory that is only readable and writable by the current user.