CVE-2026-78254: CWE-23 Relative path traversal in Apache Software Foundation Apache Ant
Description
CVE-2026-78254 is a relative path traversal vulnerability in Apache Ant's ftp and scp tasks that allows a malicious server to write files outside the intended target directory. This can lead to 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 a malicious or man-in-the-middle server, with additional server identity checks required for scp and ftps. The issue is fixed in Apache Ant 1.10.18, which prevents writing outside the destination directory by default.
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
Apache Ant's ftp and scp tasks download files from remote servers. Prior to version 1.10.18, these tasks do not properly restrict file paths, allowing a malicious server to provide relative paths that cause files to be written outside the designated target directory. This path traversal vulnerability (CWE-23) enables overwriting arbitrary files using the permissions of the Ant process user. Exploitation requires a malicious or man-in-the-middle server; for scp and ftps, server identity checks must be passed. Starting with Ant 1.10.18, the tasks prevent writing outside the destination directory by default, mitigating this vulnerability. Users can disable this protection if needed for legacy build files.
Potential Impact
Successful exploitation allows an attacker controlling or intercepting the remote server connection to overwrite arbitrary files on the victim system with the permissions of the user running Apache Ant. This can lead to compromise of system integrity and potentially escalate to further attacks. The vulnerability does not affect availability but has high confidentiality and integrity impact. The CVSS v3.1 score is 7.4 (High).
Mitigation Recommendations
Upgrade to Apache Ant version 1.10.18 or later, which includes an official fix preventing path traversal outside the destination directory by default. Users should ensure that server identity checks are not bypassed when using scp and ftp with ftps. For ftp without ftps, switching to ftps is recommended to prevent man-in-the-middle attacks. If legacy behavior is required, the new protection can be disabled, but this is not recommended.
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: 09/15/2026, 00:59:58 UTC
Last updated: 10/09/2026, 18:48:23 UTC
Views: 104
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.