CVE Database›Document archive›CVE-2026-78254

CVE-2026-78254

org.apache.ant/ant: Apache Ant: Arbitrary file write via path traversal in ftp and scp tasks

Loading…

Severity

Moderate

Red Hat Product Security

6.8

CVSS 3.1

Review impact separately from score.

Published · September 7, 2026

Updated · November 3, 2026

Description

A flaw was found in Apache Ant. The ftp and scp tasks, used for downloading files, are vulnerable to a path traversal issue. A malicious remote server can exploit this by providing specially crafted relative paths, allowing it to write files outside the intended download directory. This could lead to an attacker overwriting arbitrary files on the system with the permissions of the user running Ant, potentially compromising the system's integrity.

Statement

This Moderate impact flaw in Apache Ant's ftp and scp tasks allows an attacker to write arbitrary files outside the intended download directory. This occurs when an Ant user connects to a malicious remote server or is subject to a machine-in-the-middle attack, enabling path traversal. Successful exploitation is limited to the privileges of the user executing Ant.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

To mitigate this vulnerability, users of Apache Ant's scp and ftp tasks should ensure that server identity checks are not bypassed. For ftp tasks not utilizing ftps, it is recommended to configure the tasks to use ftps to enhance security against machine-in-the-middle attacks.

CVSS / CWE

CVSS 3.1 · 6.8
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:H

CWE-22 · Improper Limitation of a Pathname to a Restricted Directory