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

High 7.4 Published Updated

A malicious server can write arbitrary files outside the target directory via path traversal in Apache Ant's ftp and scp tasks.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-78254?

CVE-2026-78254 is a high-severity path traversal vulnerability in Apache Ant, published on 7 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-23

Which versions are affected by CVE-2026-78254?

It affects 1 product.

Linux distribution packages (1)
ant openSUSE:TumbleweedAll versions1.10.18-2.1

Products include Apache Ant.

How do I fix CVE-2026-78254?

Upgrade to a fixed version.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-78254 being exploited?

There is no known exploitation of CVE-2026-78254 in the wild and no public exploit code.

Sources

Also known as AZL-99972, BELL-CVE-2026-78254, CLEANSTART-2026-DD03194, CLEANSTART-2026-OZ64651, CLSA-2026-1789382807, CLSA-2026-1789746085 and 4 more.

Is CVE-2026-78254 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free