CVE-2026-78254Apache Ant: Path traversal in ftp and scp tasks allows arbitrary file write
The ftp and scp tasks of Apache Ant can download files from a remote server. A malicious server can provide relative paths that allow it to write outside of the dedicated target directory for the download, making it possible to overwrite files of the attacker's choice using the permissions of the user running Ant in versions prior to Ant 1.10.18. In order to exploit this vulnerability, the server would either have to be malicious or be subject to a machine-in-the-middle attack. Additionally in the case of scp or the ftp task using ftps the server must pass the server identity checks performed by the tasks. For ftp tasks not using ftps a malicious server could act as a machine-in-the-middle to provide malicious files. Starting with Ant 1.10.18 both tasks will prevent writing outside of the destination directory by default. An option is available to disable this behavior in the unlikely case that the old behavior is required by existing build files. Mitigations: Users of scp and ftp (when using ftps) in any version of Ant should not bypass server identity checks. Users of ftp not using ftps should switch to ftps where possible. All users are recommended to upgrade to Apache Ant 1.10.18, which fixes this issue.
What to do
Fixed builds are available from Alpine, Debian: see the table below for the fixed version per release.
Debian, Red Hat, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | ant | Fix pending | UBUNTU-CVE-2026-78254 | |
| Ubuntu 26.04 | ant | Under investigation | UBUNTU-CVE-2026-78254 | |
| Ubuntu 24.04 | ant | Under investigation | UBUNTU-CVE-2026-78254 | |
| Ubuntu 22.04 | ant | Under investigation | UBUNTU-CVE-2026-78254 | |
| Ubuntu 20.04 | ant | Fix pending | UBUNTU-CVE-2026-78254 | |
| Ubuntu 18.04 | ant | Fix pending | UBUNTU-CVE-2026-78254 | |
| Ubuntu 16.04 | ant | Fix pending | UBUNTU-CVE-2026-78254 | |
| Ubuntu 14.04 | ant | Fix pending | UBUNTU-CVE-2026-78254 | |
| Debian 14 | ant | Fixed | 1.10.18-1 | DEBIAN-CVE-2026-78254 |
| Debian 13 | ant | Fix pending | DEBIAN-CVE-2026-78254 | |
| Debian 12 | ant | Fix pending | DEBIAN-CVE-2026-78254 | |
| Red Hat Enterprise Linux 10 | ant | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-antlr | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-apache-bcel | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-apache-bsf | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-apache-oro | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-apache-regexp | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-apache-resolver | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-apache-xalan2 | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-commons-logging | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-commons-net | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-imageio | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-jakartamail | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-javadoc | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-jdepend | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-jmf | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-jsch | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-junit | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-junit5 | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-lib | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-manual | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-openjdk21 | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-swing | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-testutil | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-unbound | Under investigation | ||
| Red Hat Enterprise Linux 10 | ant-xz | Under investigation | ||
| Red Hat Enterprise Linux 10 | maven-plugin-annotations | Not affected | ||
| Red Hat Enterprise Linux 10 | maven-plugin-plugin | Not affected | ||
| Red Hat Enterprise Linux 10 | maven-plugin-tools | Not affected | ||
| Red Hat Enterprise Linux 10 | maven-plugin-tools-annotations | Not affected | ||
| Red Hat Enterprise Linux 10 | maven-plugin-tools-api | Not affected | ||
| Red Hat Enterprise Linux 10 | maven-plugin-tools-generators | Not affected | ||
| Red Hat Enterprise Linux 10 | maven-plugin-tools-java | Not affected | ||
| Red Hat Enterprise Linux 10 | maven-plugin-tools-javadoc | Not affected | ||
| Red Hat Enterprise Linux 10 | tomcat-jakartaee-migration | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | ant | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-antlr | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-apache-bcel | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-apache-bsf | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-apache-oro | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-apache-regexp | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-apache-resolver | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-apache-xalan2 | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-commons-logging | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-commons-net | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-javamail | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-jdepend | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-jmf | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-jsch | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-junit | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-junit5 | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-lib | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-manual | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-openjdk11 | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-openjdk17 | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-openjdk21 | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-openjdk8 | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-swing | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-testutil | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-unbound | Under investigation | ||
| Red Hat Enterprise Linux 9 | ant-xz | Under investigation | ||
| Red Hat Enterprise Linux 9 | jmc | Fix pending Affected | ||
| Red Hat Enterprise Linux 9 | maven-plugin-annotations | Not affected | ||
| Red Hat Enterprise Linux 9 | maven-plugin-plugin | Not affected | ||
| Red Hat Enterprise Linux 9 | maven-plugin-tools-annotations | Not affected | ||
| Red Hat Enterprise Linux 9 | maven-plugin-tools-api | Not affected | ||
| Red Hat Enterprise Linux 9 | maven-plugin-tools-generators | Not affected | ||
| Red Hat Enterprise Linux 9 | maven-plugin-tools-java | Not affected | ||
| Red Hat Enterprise Linux 8 | ant | Under investigation | ||
| Red Hat Enterprise Linux 8 | ant-antlr | Under investigation | ||
| Red Hat Enterprise Linux 8 | ant-apache-bcel | Under investigation | ||
| Red Hat Enterprise Linux 8 | ant-apache-bsf | Under investigation | ||
| Red Hat Enterprise Linux 8 | ant-apache-log4j | Under investigation | ||
| Red Hat Enterprise Linux 8 | ant-apache-oro | Under investigation | ||
| Red Hat Enterprise Linux 8 | ant-apache-regexp | Under investigation | ||
| Red Hat Enterprise Linux 8 | ant-apache-resolver | Under investigation | ||
| Red Hat Enterprise Linux 8 | ant-apache-xalan2 | Under investigation | ||
| Red Hat Enterprise Linux 8 | ant-commons-logging | Under investigation | ||
| Red Hat Enterprise Linux 8 | ant-commons-net | Under investigation | ||
| Red Hat Enterprise Linux 8 | ant-javadoc | Under investigation | ||
| Red Hat Enterprise Linux 8 | ant-javamail | Under investigation | ||
| Red Hat Enterprise Linux 8 | ant-jdepend | Under investigation | ||
| Red Hat Enterprise Linux 8 | ant-jmf | Under investigation | ||
| Red Hat Enterprise Linux 8 | ant-jsch | Under investigation | ||
| Red Hat Enterprise Linux 8 | ant-junit | Under investigation | ||
| Red Hat Enterprise Linux 8 | ant-lib | Under investigation | ||
| Red Hat Enterprise Linux 8 | ant-manual | Under investigation | ||
| Red Hat Enterprise Linux 8 | ant-swing | Under investigation | ||
| Red Hat Enterprise Linux 8 | ant-testutil | Under investigation | ||
| Red Hat Enterprise Linux 8 | ant-xz | Under investigation | ||
| Red Hat Enterprise Linux 8 | glassfish-jaxb | Not affected | ||
| Red Hat Enterprise Linux 8 | glassfish-jaxb-bom | Not affected | ||
| Red Hat Enterprise Linux 8 | glassfish-jaxb-bom-ext | Not affected | ||
| Red Hat Enterprise Linux 8 | glassfish-jaxb-codemodel | Not affected | ||
| Red Hat Enterprise Linux 8 | glassfish-jaxb-codemodel-annotation-compiler | Not affected | ||
| Red Hat Enterprise Linux 8 | glassfish-jaxb-codemodel-parent | Not affected | ||
| Red Hat Enterprise Linux 8 | glassfish-jaxb-core | Not affected | ||
| Red Hat Enterprise Linux 8 | glassfish-jaxb-external-parent | Not affected | ||
| Red Hat Enterprise Linux 8 | glassfish-jaxb-parent | Not affected | ||
| Red Hat Enterprise Linux 8 | glassfish-jaxb-rngom | Not affected | ||
| Red Hat Enterprise Linux 8 | glassfish-jaxb-runtime | Not affected | ||
| Red Hat Enterprise Linux 8 | glassfish-jaxb-runtime-parent | Not affected | ||
| Red Hat Enterprise Linux 8 | glassfish-jaxb-txw-parent | Not affected | ||
| Red Hat Enterprise Linux 8 | glassfish-jaxb-txw2 | Not affected | ||
| Red Hat Enterprise Linux 8 | maven-antrun-plugin | Not affected | ||
| Red Hat Enterprise Linux 8 | maven-antrun-plugin-javadoc | Not affected | ||
| Red Hat Enterprise Linux 8 | maven-script-interpreter | Not affected | ||
| Red Hat Enterprise Linux 8 | maven-script-interpreter-javadoc | Not affected | ||
| Red Hat Enterprise Linux 8 | plexus-ant-factory | Not affected | ||
| Red Hat Enterprise Linux 8 | plexus-ant-factory-javadoc | Not affected | ||
| Red Hat Enterprise Linux 8 | testng | Not affected | ||
| Red Hat Enterprise Linux 8 | testng-javadoc | Not affected | ||
| Red Hat Enterprise Linux 7 | ant | Under investigation | ||
| Red Hat Enterprise Linux 7 | ant-antlr | Under investigation | ||
| Red Hat Enterprise Linux 7 | ant-apache-bcel | Under investigation | ||
| Red Hat Enterprise Linux 7 | ant-apache-bsf | Under investigation | ||
| Red Hat Enterprise Linux 7 | ant-apache-log4j | Under investigation | ||
| Red Hat Enterprise Linux 7 | ant-apache-oro | Under investigation | ||
| Red Hat Enterprise Linux 7 | ant-apache-regexp | Under investigation | ||
| Red Hat Enterprise Linux 7 | ant-apache-resolver | Under investigation | ||
| Red Hat Enterprise Linux 7 | ant-apache-xalan2 | Under investigation | ||
| Red Hat Enterprise Linux 7 | ant-commons-logging | Under investigation | ||
| Red Hat Enterprise Linux 7 | ant-commons-net | Under investigation | ||
| Red Hat Enterprise Linux 7 | ant-javadoc | Under investigation | ||
| Red Hat Enterprise Linux 7 | ant-javamail | Under investigation | ||
| Red Hat Enterprise Linux 7 | ant-jdepend | Under investigation | ||
| Red Hat Enterprise Linux 7 | ant-jmf | Under investigation | ||
| Red Hat Enterprise Linux 7 | ant-jsch | Under investigation | ||
| Red Hat Enterprise Linux 7 | ant-junit | Under investigation | ||
| Red Hat Enterprise Linux 7 | ant-manual | Under investigation | ||
| Red Hat Enterprise Linux 7 | ant-swing | Under investigation | ||
| Red Hat Enterprise Linux 7 | ant-testutil | Under investigation | ||
| Red Hat Enterprise Linux 7 | codemodel | Not affected | ||
| Red Hat Enterprise Linux 7 | codemodel-javadoc | Not affected | ||
| Red Hat Enterprise Linux 7 | ecj | Not affected | ||
| Red Hat Enterprise Linux 7 | groovy | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | groovy-javadoc | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | jandex | Not affected | ||
| Red Hat Enterprise Linux 7 | jandex-javadoc | Not affected | ||
| Red Hat Enterprise Linux 7 | maven-antrun-plugin | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | maven-antrun-plugin-javadoc | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | maven-invoker-plugin | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | maven-invoker-plugin-javadoc | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | maven-shared-jar | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | maven-shared-jar-javadoc | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | objectweb-anttask | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | objectweb-anttask-javadoc | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | plexus-ant-factory | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | plexus-ant-factory-javadoc | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | txw2 | Not affected | ||
| Red Hat Enterprise Linux 7 | txw2-javadoc | Not affected | ||
| Red Hat Enterprise Linux 6 | ant | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ant-antlr | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ant-apache-bcel | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ant-apache-bsf | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ant-apache-log4j | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ant-apache-oro | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ant-apache-regexp | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ant-apache-resolver | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ant-commons-logging | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ant-commons-net | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ant-javadoc | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ant-javamail | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ant-jdepend | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ant-jmf | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ant-jsch | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ant-junit | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ant-manual | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ant-nodeps | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ant-scripts | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ant-swing | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ant-trax | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | batik | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | batik-demo | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | batik-javadoc | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | batik-rasterizer | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | batik-slideshow | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | batik-squiggle | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | batik-svgpp | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | batik-ttf2svg | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ecj | Fix pending Affected | ||
| Red Hat Enterprise Linux 6 | objectweb-anttask | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | objectweb-anttask-javadoc | Will not fix Will not fix | ||
| Alpine Linux 3.24 | apache-ant | Fixed | 1.10.18-r0 | ALPINE-CVE-2026-78254 |
What the vendor says
As published in the CVE record by apache, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- Apache Software Foundation Apache Ant: affected: 1.2 to before 1.10.18; fixed in
1.10.18
Vendor advisories:
- https://lists.apache.org/thread/05s46qrlbhd06c6rsgvxh8zo0l4p9scz (vendor-advisory)
References
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.