CVE-2026-128984: Apache Camel: Camel-SFTP passes file names to JSch as glob patterns, so wildcards act on other files in the directory
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Apache Camel SFTP component.
This issue affects Apache Camel: from 4.0.0 before 4.18.6, from 4.19.0 before 4.22.3, from 4.23.0 before 4.24.0.
camel-sftp (the JSch-based sftp in the camel-ftp module, SftpOperations) passed file names to JSch put, get, rm and rename as glob patterns rather than literal names, so a name containing ? or matched and acted on other files in the same directory, allowing an unintended file to be read, overwritten or deleted. The fixed releases pass the file names to JSch literally.
Upgrade to Apache Camel 4.24.0, which fixes the issue. Users on the 4.22.x LTS release stream should upgrade to 4.22.3. Users on the 4.18.x LTS release stream should upgrade to 4.18.6.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 4.24.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 4.18.6 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 4.22.3
Event History
Frequently Asked Questions
Which deployments are affected?
Deployments using the JSch-based camel-sftp component in the camel-ftp module are affected if they run Apache Camel 4.0.0 through before 4.18.6, 4.19.0 through before 4.22.3, or 4.23.0 through before 4.24.0.
What is required to trigger the issue?
An SFTP file name containing ? or * must be passed through affected SftpOperations calls. Those characters are interpreted as glob patterns by JSch for put, get, rm, and rename operations, potentially causing the operation to affect other files in the same directory.
What can an attacker do through this flaw?
A wildcard-containing name can cause an unintended file in the same directory to be read, overwritten, or deleted. The issue does not describe impact outside that directory.
How should affected users remediate the issue?
Upgrade to Apache Camel 4.24.0. For supported LTS streams, upgrade to 4.22.3 on 4.22.x or 4.18.6 on 4.18.x; these releases pass file names to JSch literally.