Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

redhat логотип

CVE-2026-78254

Опубликовано: 07 сент. 2026
Источник: redhat
CVSS3: 6.8
EPSS Низкий

Описание

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.

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.

Отчет

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.

Меры по смягчению последствий

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.

Затронутые пакеты

ПлатформаПакетСостояниеРекомендацияРелиз
Migration Toolkit for Applications 8mta/mta-cli-rhel9Affected
Migration Toolkit for Applications 8mta/mta-java-external-provider-rhel9Affected
OpenShift Developer Tools and ServicesjenkinsAffected
OpenShift Developer Tools and Servicesocp-tools-4/jenkins-rhel8Affected
OpenShift Developer Tools and Servicesocp-tools-4/jenkins-rhel9Affected
Red Hat build of Apicurio Registry 3antAffected
Red Hat Enterprise Linux 10maven-plugin-toolsAffected
Red Hat Enterprise Linux 10tomcat-jakartaee-migrationFix deferred
Red Hat Enterprise Linux 6antWill not fix
Red Hat Enterprise Linux 6batikWill not fix

Показывать по

Дополнительная информация

Статус:

Moderate
Дефект:
CWE-22
https://bugzilla.redhat.com/show_bug.cgi?id=2529299org.apache.ant/ant: Apache Ant: Arbitrary file write via path traversal in ftp and scp tasks

EPSS

Процентиль: 44%
0.0054
Низкий

6.8 Medium

CVSS3

Связанные уязвимости

CVSS3: 7.4
ubuntu
10 дней назад

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

CVSS3: 7.4
nvd
10 дней назад

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: U

msrc
7 дней назад

Apache Ant: Path traversal in ftp and scp tasks allows arbitrary file write

CVSS3: 7.4
debian
10 дней назад

The ftp and scp tasks of Apache Ant can download files from a remote s ...

CVSS3: 7.4
github
10 дней назад

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

EPSS

Процентиль: 44%
0.0054
Низкий

6.8 Medium

CVSS3