/

CVE-2026-79983

Severity:

HIGH RISK

(7.4)

Path Traversal (CWE-22) in Apache Camel FTP Component

CVE-2026-79983

Analyzed

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Unauthorized Remote File Access and Manipulation

Severity:

HIGH RISK

(7.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Apache Camel's FTP-based remote-file consumers can accept path components from a remote directory listing without confirming that the resulting path remains within the configured polling directory. A malicious, compromised, or tampered server may therefore cause Camel to retrieve, delete, or rename files outside the intended directory using the endpoint's credentials.

Apache Camel's FTP-based remote-file consumers can accept path components from a remote directory listing without confirming that the resulting path remains within the configured polling directory. A malicious, compromised, or tampered server may therefore cause Camel to retrieve, delete, or rename files outside the intended directory using the endpoint's credentials.

Affected context

The vulnerability occurs in Apache Camel FTP, FTPS, and SFTP remote-file consumers when a server-supplied listing entry is combined with the configured polling directory and used as a remote operation path. The affected behavior is relevant when the remote server is malicious, compromised, multi-tenant, backed by a virtual filesystem, or when an attacker can alter an unprotected FTP control-channel response. Retrieval is available in default consumer operation, while deletion and renaming depend on route disposition settings such as delete, move, preMove, moveFailed, or rename-based read locking.

The vulnerability occurs in Apache Camel FTP, FTPS, and SFTP remote-file consumers when a server-supplied listing entry is combined with the configured polling directory and used as a remote operation path. The affected behavior is relevant when the remote server is malicious, compromised, multi-tenant, backed by a virtual filesystem, or when an attacker can alter an unprotected FTP control-channel response. Retrieval is available in default consumer operation, while deletion and renaming depend on route disposition settings such as delete, move, preMove, moveFailed, or rename-based read locking.

Exploit preconditions

  • Attack surface: Apache Camel remote-file consumer endpoints using FTP, FTPS, or SFTP.
  • Required access: Ability to influence the remote server's directory listing, directly or through server compromise, malicious administration, virtualization, or an on-path alteration of an unprotected FTP control channel.
  • Trigger point: Processing a directory listing entry during polling and subsequent retrieval, deletion, or rename operations.
  • Why exploitation is possible: The reported name is concatenated with the configured directory without lexical normalization or containment validation, allowing the resulting operand to resolve outside the intended polling directory.
  • Attack surface: Apache Camel remote-file consumer endpoints using FTP, FTPS, or SFTP.
  • Required access: Ability to influence the remote server's directory listing, directly or through server compromise, malicious administration, virtualization, or an on-path alteration of an unprotected FTP control channel.
  • Trigger point: Processing a directory listing entry during polling and subsequent retrieval, deletion, or rename operations.
  • Why exploitation is possible: The reported name is concatenated with the configured directory without lexical normalization or containment validation, allowing the resulting operand to resolve outside the intended polling directory.

Why this happens

The underlying bug is an insufficient pathname containment check, mapped to CWE-22: Improper Limitation of a Pathname to a Restricted Directory. Camel trusted a remote listing name as a path component, constructed an absolute remote path through string concatenation, and used that path for later file operations without normalizing it and verifying that it remained beneath the configured directory. Although related local download handling enforced containment for the local work directory, the corresponding remote operation path lacked the same boundary enforcement.

The underlying bug is an insufficient pathname containment check, mapped to CWE-22: Improper Limitation of a Pathname to a Restricted Directory. Camel trusted a remote listing name as a path component, constructed an absolute remote path through string concatenation, and used that path for later file operations without normalizing it and verifying that it remained beneath the configured directory. Although related local download handling enforced containment for the local work directory, the corresponding remote operation path lacked the same boundary enforcement.

Potential impact

  • Camel may retrieve files outside the configured polling directory.
  • Camel may delete files outside the intended directory when deletion is enabled.
  • Camel may rename or move unintended remote files when disposition or locking options permit it.
  • Sensitive remote file contents may be exposed to the application or downstream processing.
  • Files may be modified, removed, or displaced using the endpoint account's permissions.
  • The effective impact may extend to the remote account boundary if the server does not confine that account.
  • Camel may retrieve files outside the configured polling directory.
  • Camel may delete files outside the intended directory when deletion is enabled.
  • Camel may rename or move unintended remote files when disposition or locking options permit it.
  • Sensitive remote file contents may be exposed to the application or downstream processing.
  • Files may be modified, removed, or displaced using the endpoint account's permissions.
  • The effective impact may extend to the remote account boundary if the server does not confine that account.

General mitigation guidance

Mitigation generally centers on treating every server-supplied listing name as untrusted and enforcing directory boundaries at the point where remote operation paths are created.

Common defensive patterns include:

  • Normalize and validate remote paths before retrieval, deletion, or renaming.
  • Require verified containment beneath the configured polling directory for every remote operation.
  • Prefer APIs that represent directory and file names separately rather than accepting unrestricted path strings.
  • Reduce trust in remote listings and use authenticated, integrity-protected transport where supported.
  • Apply least privilege to endpoint credentials and constrain remote accounts to dedicated directories.
  • Disable unnecessary deletion, movement, and rename behaviors when they are not required.
  • Keep local work-directory containment controls enabled and enforce equivalent checks on remote operands.

Mitigation generally centers on treating every server-supplied listing name as untrusted and enforcing directory boundaries at the point where remote operation paths are created.

Common defensive patterns include:

  • Normalize and validate remote paths before retrieval, deletion, or renaming.
  • Require verified containment beneath the configured polling directory for every remote operation.
  • Prefer APIs that represent directory and file names separately rather than accepting unrestricted path strings.
  • Reduce trust in remote listings and use authenticated, integrity-protected transport where supported.
  • Apply least privilege to endpoint credentials and constrain remote accounts to dedicated directories.
  • Disable unnecessary deletion, movement, and rename behaviors when they are not required.
  • Keep local work-directory containment controls enabled and enforce equivalent checks on remote operands.

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules identifying path construction by concatenating configured directories with remote or external names.
  • Code review checks for missing normalization, canonicalization, or containment validation before file operations.
  • Tests using directory-listing names containing parent-directory components and other multi-segment forms.
  • Runtime monitoring for remote operations targeting paths outside an endpoint's configured directory.
  • Policy enforcement requiring integrity-protected transport, least-privilege file accounts, and explicit path-boundary validation.
  • Automated security review tools that flag externally controlled path values flowing into retrieval, deletion, rename, or move APIs.

Organizations can look for this weakness through:

  • Static analysis rules identifying path construction by concatenating configured directories with remote or external names.
  • Code review checks for missing normalization, canonicalization, or containment validation before file operations.
  • Tests using directory-listing names containing parent-directory components and other multi-segment forms.
  • Runtime monitoring for remote operations targeting paths outside an endpoint's configured directory.
  • Policy enforcement requiring integrity-protected transport, least-privilege file accounts, and explicit path-boundary validation.
  • Automated security review tools that flag externally controlled path values flowing into retrieval, deletion, rename, or move APIs.

Sources

SourceLink
camel.apache.orgcamel.apache.org/security/CVE-2026-79983.html
github.comgithub.com/apache/camel/pull/25730
github.comgithub.com/apache/camel/pull/25745
github.comgithub.com/apache/camel/pull/25746
github.comgithub.com/apache/camel/pull/25747
issues.apache.orgissues.apache.org/jira/browse/CAMEL-24487
github.comgithub.com/oscerd/CVE-2026-79983

Frequently asked

questions

It can be, depending on the deployment. An attacker generally needs to influence the remote directory listing, which may be possible through a malicious or compromised server or by altering an unprotected FTP control-channel response.

Not necessarily. The relevant access is control over, or influence on, the remote server response. The Camel endpoint's existing credentials are then used for the resulting file operation.

Treat listing names as untrusted, normalize the resulting path, and enforce that every remote operation remains within the configured polling directory before it is executed.

Combine strict path-containment checks with integrity-protected transport, dedicated least-privilege remote accounts, secure-by-default endpoint settings, and tests covering multi-segment and traversal-like listing names.

It can be, depending on the deployment. An attacker generally needs to influence the remote directory listing, which may be possible through a malicious or compromised server or by altering an unprotected FTP control-channel response.

Not necessarily. The relevant access is control over, or influence on, the remote server response. The Camel endpoint's existing credentials are then used for the resulting file operation.

Treat listing names as untrusted, normalize the resulting path, and enforce that every remote operation remains within the configured polling directory before it is executed.

Combine strict path-containment checks with integrity-protected transport, dedicated least-privilege remote accounts, secure-by-default endpoint settings, and tests covering multi-segment and traversal-like listing names.

Find out what's already
exploitable in your codebase.