CVE-2026-78254: CWE-23 Relative path traversal in Apache Software Foundation Apache Ant
Description
CVE-2026-78254 is a high-severity vulnerability in Apache Ant's ftp and scp tasks that allows a malicious server to perform relative path traversal. This enables writing files outside the intended download directory, potentially overwriting arbitrary files with the permissions of the user running Ant. The vulnerability affects Apache Ant versions from 1.2 up to but not including 1.10.18. Exploitation requires either a malicious server or a man-in-the-middle attack, with additional server identity checks required for scp and ftps. Apache Ant 1.10.18 includes a fix that prevents writing outside the destination directory by default. Users are advised to upgrade to this version and follow recommended mitigations regarding server identity checks and use of ftps.
CVSS v3.1
Score 7.4high
Affected software
Apache Software Foundation
Apache Ant
pkg:maven/Apache Software Foundation/org.apache.ant:antRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The ftp and scp tasks in Apache Ant versions >=1.2 and <1.10.18 allow a malicious remote server to supply relative paths that cause files to be written outside the designated target directory during downloads. This relative path traversal vulnerability (CWE-23) can lead to arbitrary file overwrite using the permissions of the user running Ant. Exploitation requires either a malicious server or a man-in-the-middle attack. For scp and ftp with ftps, the server must pass identity checks, reducing risk. For ftp without ftps, a man-in-the-middle can provide malicious files more easily. Starting with Apache Ant 1.10.18, the tasks prevent writing outside the destination directory by default, with an option to disable this behavior for backward compatibility. Users are recommended to upgrade to 1.10.18 and not bypass server identity checks.
Potential Impact
Successful exploitation allows an attacker controlling or intercepting the remote server to overwrite arbitrary files on the local system with the privileges of the user running Apache Ant. This can lead to compromise of system integrity and potentially escalate to further attacks depending on the overwritten files. The vulnerability does not affect availability but impacts confidentiality and integrity.
Mitigation Recommendations
Upgrade Apache Ant to version 1.10.18 or later, which includes an official fix preventing writing outside the destination directory by default. Users of scp and ftp tasks with ftps should ensure server identity checks are not bypassed. Users of ftp without ftps are advised to switch to ftps where possible to reduce risk of man-in-the-middle attacks. Avoid disabling the new default protection unless absolutely necessary for legacy build files.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- apache
- Date Reserved
- 2026-08-24T07:17:27.205Z
- State
- PUBLISHED
Threat ID: 6a9e6d62acd9273b493040cd
Added to database: 09/07/2026, 07:53:06 UTC
Last enriched: 10/17/2026, 23:40:06 UTC
Last updated: 10/22/2026, 01:15:26 UTC
Views: 116
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.