Skip to main content
Vulnerability Database/CVE-2026-79984

CVE-2026-79984: Apache Camel Mina SFTP Path Traversal Flaw

CVE-2026-79984 is a path traversal flaw in Apache Camel Mina SFTP component allowing attackers to access files outside configured directories. This article covers technical details, affected versions, and upgrade paths.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-79984 Overview

CVE-2026-79984 is a path traversal vulnerability [CWE-22] in the Apache Camel mina-sftp component. The Camel remote-file consumer polls a directory on a remote server and concatenates the configured directory with each file name returned in the server's directory listing. Neither FtpUtils.absoluteFilePath nor GenericFileConsumer applied lexical normalization or verified that the resulting path stayed within the polled directory. A listing entry supplied by the server can therefore escape the configured directory and reach files outside it using the endpoint's credentials. The flaw affects Apache Camel 4.18.0 before 4.18.5 and 4.19.0 before 4.22.1.

Critical Impact

An on-path attacker or malicious SFTP server can cause Camel to read, delete, or rename files outside the configured polling directory using the endpoint's own credentials.

Affected Products

  • Apache Camel 4.18.0 through 4.18.4 (mina-sftp component)
  • Apache Camel 4.19.0 through 4.22.0 (mina-sftp component)
  • Camel routes using remote-file consumers derived from RemoteFileConsumer

Discovery Timeline

  • 2026-10-19 - CVE-2026-79984 published to NVD
  • 2026-10-20 - Last updated in NVD database

Technical Details for CVE-2026-79984

Vulnerability Analysis

The Camel remote-file consumer builds an absolute remote path by concatenating the configured polling directory with the file name returned in the server's directory listing. The concatenation routines FtpUtils.absoluteFilePath and GenericFileConsumer apply no lexical normalization. The resulting path then becomes the operand for every subsequent remote operation on the file.

Affected operations include retrieval through FtpOperations.retrieveFile and SftpOperations, deletion through GenericFileDeleteProcessStrategy when delete=true, and renaming through GenericFileProcessStrategySupport and GenericFileRenameExclusiveReadLockStrategy when move, preMove, moveFailed, or readLock=rename is set. Neither isValidFile nor isMatched performs a containment check.

Retrieval is reachable in the default consumer configuration because consumers download every listed file. Deletion and renaming require one of the disposition options above, which are common in production routes.

Root Cause

The jailStartingDirectory option is documented as restricting Camel to the starting directory and is enabled by default. It governs producer writes and consumer downloads to the localWorkDirectory, but it never constrained the remote operand built from the server listing. The mina-sftp consumer inherits RemoteFileConsumer and therefore inherits the same unconstrained path resolution.

Attack Vector

A listing name is not route-controlled data. The remote server supplies it, and the FTP control channel carries no integrity protection. An on-path attacker can rewrite a LIST response without holding credentials. A compromised, malicious, or multi-tenant server, or a server backed by a virtual filesystem, can emit a crafted name directly. A listing entry containing parent-directory segments such as ../../etc/passwd resolves to a path outside the configured polling directory. Escape from the Camel-configured directory is unconditional. Escape from the server account boundary depends on whether that server confines the account.

See the Apache Camel CVE-2026-79984 Advisory and the public proof-of-concept repository for technical details.

Detection Methods for CVE-2026-79984

Indicators of Compromise

  • Camel log entries referencing remote file paths containing .. segments or absolute paths outside the configured directoryName.
  • Unexpected retrieveFile, delete, or rename operations against paths outside the polled directory in FtpOperations or SftpOperations debug logs.
  • Files from directories the Camel endpoint should not access appearing in the configured localWorkDirectory.

Detection Strategies

  • Audit Camel route definitions for ftp:, ftps:, sftp:, and mina-sftp: consumers and enumerate those using delete=true, move, preMove, moveFailed, or readLock=rename.
  • Inspect server-side SFTP and FTP logs for LIST responses containing non-single-segment names, parent-directory sequences, or absolute paths.
  • Correlate Camel consumer activity with filesystem reads, deletes, and renames outside the endpoint's intended working directory.

Monitoring Recommendations

  • Enable DEBUG logging on org.apache.camel.component.file.remote during incident review to capture resolved remote paths.
  • Monitor the service account used by Camel SFTP endpoints for access to files outside the expected directory tree.
  • Alert on new or modified Camel routes introducing remote-file consumers against untrusted or multi-tenant servers.

How to Mitigate CVE-2026-79984

Immediate Actions Required

  • Upgrade Apache Camel to 4.23.0, 4.22.1, or 4.18.5 depending on the release stream in use.
  • Move off the 4.14.x stream, which has reached end of life and will not receive this fix.
  • Restrict Camel SFTP and FTP consumers to trusted servers and confine the server-side account to the intended directory.

Patch Information

Apache fixed the issue by adding containment checks to the resolved remote path. The fix is tracked in Apache JIRA CAMEL-24487 and delivered through Pull Request #25730, #25745, #25746, and #25747. Users on the 4.22.x stream should move to 4.22.1. Users on the 4.18.x LTS stream should move to 4.18.5. All others should move to 4.23.0.

Workarounds

  • Terminate SFTP and FTP sessions on a reverse proxy or jump host that enforces chroot or equivalent containment on the authenticated account.
  • Replace plain FTP with SFTP or FTPS to prevent on-path rewriting of LIST responses.
  • Avoid pointing Camel consumers at multi-tenant servers or servers backed by virtual filesystems until patched versions are deployed.
bash
# Configuration example: pin Camel to a patched version in Maven
<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-ftp</artifactId>
  <version>4.23.0</version>
</dependency>
<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-mina-sftp</artifactId>
  <version>4.23.0</version>
</dependency>

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.