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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.4
- **CVSS:** 7.4 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.76% (percentile 51, 2026-11-26)
- **CWE:** CWE-23
- **Published:** 2026-09-07T07:41:54.077Z
- **Modified:** 2026-09-09T13:29:39.243Z

## Who should check

- Anyone running Apache Software Foundation Apache Ant \>= 1.2, \< 1.10.18

## 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.

## Affected and fixed versions

- Apache Software Foundation Apache Ant: \>= 1.2, \< 1.10.18 (cvelist)

## Mitigation

- Upgrade Apache Ant to 1.10.18 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-78254. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-78254.md
Affected: Apache Software Foundation Apache Ant >= 1.2, < 1.10.18
Fixed in: Apache Software Foundation Apache Ant 1.10.18

Steps:
1. Search this machine and project for Apache Software Foundation Apache Ant: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-78254 being exploited?

There is no confirmed exploitation: CVE-2026-78254 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.76% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-78254?

High: CVSS 7.4 (v3.1, scored by CNA). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2026-78254?

Apache Software Foundation Apache Ant \>= 1.2, \< 1.10.18.

### Is there a fix for CVE-2026-78254?

Yes. Fixed in Apache Software Foundation Apache Ant 1.10.18. Upgrade Apache Ant to 1.10.18 or later.

### How do I check if I'm affected by CVE-2026-78254?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://lists.apache.org/thread/05s46qrlbhd06c6rsgvxh8zo0l4p9scz>
- other: <http://www.openwall.com/lists/oss-security/2026/09/06/2>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-78254>

HTML: <https://flawdb.com/CVE-2026-78254> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-78254>
