CVE-2026-78254: Apache Ant: Path traversal in ftp and scp tasks allows arbitrary file write

Published Sep 6, 2026
·
Updated

Apache Ant: Path traversal in ftp and scp tasks allows arbitrary file write

Other sources

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.

— MITRE

Affected Software

13 affected componentsFixes available
Apache Apache Ant<1.10.18
Apache Ant<1.10.18
Microsoft azl3 ant 1.10.14-1<1.10.18-1
1.10.18-1
alpine/apache-ant<1.10.18-r0
1.10.18-r0
IBM Cloud Pak for Data System (Yosemite 1.0)<=11.3.1.2-IF1 - 11.3.1.2-IF2
ubuntu/ant*
ubuntu/ant*
ubuntu/ant*
ubuntu/ant*
ubuntu/ant*
ubuntu/ant*
ubuntu/ant*
ubuntu/ant*

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.10.18-1
  2. Upgrade

    Upgrade alpine/apache-ant to a version that resolves this vulnerability.

    Fixed in 1.10.18-r0
  3. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.10.18
  4. Configuration

    Do not bypass server identity checks.

    Apache Ant scp and ftp tasks (when using ftps) server identity checks = enabled
  5. Configuration

    Switch ftp tasks that do not use ftps to FTPS where possible.

    Apache Ant ftp task transfer protocol = FTPS

Event History

Sep 7, 2026
CVE Published
via MITRE·07:41 AM
Data Sourced
via MITRE·07:41 AM
DescriptionWeakness
Data Sourced
via OSV·07:41 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:17 AM
DescriptionWeakness
Sep 8, 2026
Data Sourced
via NVD·04:18 PM
Severity
Sep 9, 2026
Data Sourced
via NVD·01:29 PM
Affected Software
Sep 11, 2026
Data Sourced
via Microsoft·08:03 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·08:03 AM
Affected Software
Oct 13, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software
Oct 21, 2026
Updated
via IBM·12:00 AM
Affected Software
Nov 24, 2026
Data Sourced
via OSV·02:56 PM
Affected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Deployments that use Ant's ftp or scp download tasks are exposed when the remote server is malicious or can be intercepted by a machine-in-the-middle attacker. The impact is limited by the permissions of the user account running Ant.

2

What additional conditions are required to exploit downloads over SCP or FTPS?

For scp and ftp tasks using FTPS, the malicious or intercepted server must also pass the server identity checks performed by the Ant tasks. Users should not bypass these identity checks.

3

Are unencrypted FTP downloads at greater risk?

Yes. For ftp tasks not using FTPS, a malicious server can act as a machine-in-the-middle and provide malicious files; switching to FTPS is recommended where possible.

4

What configuration changes address the issue if upgrading is possible?

Upgrade to Apache Ant 1.10.18. In that version, ftp and scp tasks prevent writes outside the destination directory by default; ensure the option that restores the old behavior has not been enabled.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203