Relative Path Traversal Affecting org.apache.ant:ant package, versions [,1.10.18)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.54% (44th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Relative Path Traversal vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JAVA-ORGAPACHEANT-19653601
  • published9 Sept 2026
  • disclosed7 Sept 2026
  • creditUnknown

Introduced: 7 Sep 2026

NewCVE-2026-78254  (opens in a new tab)
CWE-23  (opens in a new tab)

How to fix?

Upgrade org.apache.ant:ant to version 1.10.18 or higher.

Overview

org.apache.ant:ant is a software tool for automating software build processes which originated from the Apache Tomcat project in early 2000.

Affected versions of this package are vulnerable to Relative Path Traversal through the file retrieval logic in FTPTask, FTPTaskMirrorImpl, ScpFromMessage, and ScpFromMessageBySftp. An attacker controlling the remote server, or a man-in-the-middle for non-FTPS FTP, can supply filenames or directory entries with relative path components that make Ant write outside the intended destination directory, allowing arbitrary file overwrite with the privileges of the user running Ant.

Workarounds

  • Do not bypass server identity checks when using scp or ftp with ftps; only download from servers whose identity you verify, to reduce the chance of a malicious or man-in-the-middle server supplying path-traversal filenames.
  • For ftp transfers that are not using ftps, switch to ftps where possible, to prevent a man-in-the-middle from tampering with the server’s file names or directory entries during download.

CVSS Base Scores

version 4.0
version 3.1