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-79985 Overview
CVE-2026-79985 is a path traversal vulnerability [CWE-22] in the Apache Camel SMB component and other Camel remote-file consumers. The flaw affects Apache Camel versions 4.2.0 through 4.18.4 and 4.19.0 through 4.22.0. Remote-file consumers build absolute paths by concatenating the configured polling directory with file names from server listings without lexical normalization or containment checks. An attacker controlling or tampering with the remote listing can cause Camel to read, delete, or rename files outside the configured directory using the endpoint's credentials.
Critical Impact
Attackers can escape the configured polling directory and perform file read, delete, or rename operations on arbitrary paths accessible to the Camel endpoint credentials.
Affected Products
- Apache Camel 4.2.0 through 4.18.4 (LTS stream)
- Apache Camel 4.19.0 through 4.22.0
- Apache Camel SMB, FTP, and SFTP components
Discovery Timeline
- 2026-10-19 - CVE-2026-79985 published to NVD
- 2026-10-20 - Last updated in NVD database
Technical Details for CVE-2026-79985
Vulnerability Analysis
The vulnerability stems from unsafe path concatenation inside Camel's remote-file consumer logic. The FtpUtils.absoluteFilePath method and GenericFileConsumer build each file's absolute remote path by joining the configured directory with the file name reported in the server's directory listing. Neither isValidFile nor isMatched performs any containment check against the polling directory.
The resulting path becomes the operand for every subsequent remote operation. Retrieval runs through FtpOperations.retrieveFile and SftpOperations. Deletion runs through GenericFileDeleteProcessStrategy when delete=true. Renaming runs through GenericFileProcessStrategySupport and GenericFileRenameExclusiveReadLockStrategy when move, preMove, moveFailed, or readLock=rename is configured.
Retrieval is reachable in default consumer configurations because remote consumers download every listed file. Deletion and renaming require common disposition options that many production routes already enable.
Root Cause
The root cause is missing lexical normalization and absence of boundary enforcement on remote file names returned by the server. The jailStartingDirectory option, documented as restricting Camel to the starting directory, governed producer writes and local work directory downloads but did not constrain remote operands. The SMB consumer walks the share listing directly rather than through RemoteFileConsumer, skipping only exact . and .. entries while concatenating any other traversal segment unchecked.
Attack Vector
Listing names are not route-controlled data. The server supplies them, and the FTP control channel carries no integrity protection, so 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 path segments such as ../../etc/passwd resolves outside the configured polling directory. Escape from the configured directory is unconditional. Escape from the server account boundary depends on whether the server confines the account.
No verified exploit code is published for the SMB scheme specifically. See the Apache Camel CVE-2026-79985 Advisory and the GitHub Repository CVE-2026-79985 for technical details.
Detection Methods for CVE-2026-79985
Indicators of Compromise
- Camel log entries showing file paths containing .., absolute path prefixes, or unexpected drive letters in remote-file consumer operations
- File system changes outside the configured polling directory performed by the account running the Camel JVM
- Unexpected delete or rename operations on files outside share roots during periods of SMB, FTP, or SFTP polling
Detection Strategies
- Audit route definitions for from("smb:..."), from("ftp:..."), and from("sftp:...") endpoints and inspect runtime logs for resolved file paths that leave the configured directory
- Enable debug logging on GenericFileConsumer and compare the resolved absolute path against the configured starting directory
- Monitor file access telemetry on hosts running Camel for process accesses to paths outside the expected share or FTP root
Monitoring Recommendations
- Instrument Camel routes with interceptors that validate GenericFile.getAbsoluteFilePath() against the configured endpoint directory
- Forward Camel application logs and host file access events to a centralized SIEM for correlation with remote-file consumer activity
- Alert on any file operation performed by the Camel service account targeting system directories or paths outside documented integration scopes
How to Mitigate CVE-2026-79985
Immediate Actions Required
- Upgrade Apache Camel to version 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 the operating system account and share permissions used by Camel endpoint credentials to the minimum directory scope required
Patch Information
The fix is delivered in Apache Camel 4.23.0 for the main stream, 4.22.1 for the 4.22.x stream, and 4.18.5 for the 4.18.x LTS stream. Patch details are available in Apache Camel Pull Request #25730, Pull Request #25745, Pull Request #25746, Pull Request #25747, and tracked in JIRA Issue CAMEL-24487.
Workarounds
- Connect remote-file consumers only to trusted servers where listing contents cannot be influenced by untrusted parties
- Prefer SFTP over FTP where possible to prevent on-path tampering with listing responses on the control channel
- Confine the server-side account used by Camel so that any traversal attempt cannot reach sensitive paths at the operating system layer
- Review and remove unnecessary delete=true, move, preMove, moveFailed, and readLock=rename options on exposed routes until patched versions are deployed
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

