/

CVE-2026-79984

Severity:

HIGH RISK

(7.4)

Path Traversal (CWE-22) in Apache Camel Mina SFTP Component

CVE-2026-79984

Undergoing Analysis

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 Mina SFTP remote-file consumer can construct remote paths from directory-listing names without normalizing them or verifying that they remain inside the configured polling directory. A malicious or compromised server, or an attacker able to alter listing data in transit, may therefore cause Camel to read, delete, or rename files outside the intended directory using the endpoint's credentials.

Apache Camel's Mina SFTP remote-file consumer can construct remote paths from directory-listing names without normalizing them or verifying that they remain inside the configured polling directory. A malicious or compromised server, or an attacker able to alter listing data in transit, may therefore cause Camel to read, delete, or rename files outside the intended directory using the endpoint's credentials.

Affected context

The issue occurs in Apache Camel deployments using the Mina SFTP component's remote-file consumer within the affected release streams. It becomes relevant when a remote directory listing contains a name with path components rather than a single file-name segment, and when Camel processes that name for retrieval, deletion, or renaming. Retrieval is part of normal consumer behavior, while deletion and renaming depend on endpoint disposition or read-lock configuration.

The issue occurs in Apache Camel deployments using the Mina SFTP component's remote-file consumer within the affected release streams. It becomes relevant when a remote directory listing contains a name with path components rather than a single file-name segment, and when Camel processes that name for retrieval, deletion, or renaming. Retrieval is part of normal consumer behavior, while deletion and renaming depend on endpoint disposition or read-lock configuration.

Exploit preconditions

  • Attack surface: The remote-file consumer's processing of names returned by a remote directory listing
  • Required access: The attacker generally needs control of, influence over, or the ability to tamper with the remote server's listing response; direct Camel authentication is not necessarily required
  • Trigger point: Path construction before remote retrieval and subsequent file disposition operations
  • Why exploitation is possible: The listing name is concatenated with the configured directory without lexical normalization or containment validation, allowing the resulting remote operand to resolve outside the polling directory
  • Additional conditions: Deletion requires a delete-enabled disposition, and renaming requires move, preMove, moveFailed, or rename-based read-lock behavior; escape beyond the remote account's own boundary depends on server-side confinement
  • Attack surface: The remote-file consumer's processing of names returned by a remote directory listing
  • Required access: The attacker generally needs control of, influence over, or the ability to tamper with the remote server's listing response; direct Camel authentication is not necessarily required
  • Trigger point: Path construction before remote retrieval and subsequent file disposition operations
  • Why exploitation is possible: The listing name is concatenated with the configured directory without lexical normalization or containment validation, allowing the resulting remote operand to resolve outside the polling directory
  • Additional conditions: Deletion requires a delete-enabled disposition, and renaming requires move, preMove, moveFailed, or rename-based read-lock behavior; escape beyond the remote account's own boundary depends on server-side confinement

Why this happens

The vulnerable pattern is constructing a filesystem or remote-file path by concatenating a trusted base directory with attacker-influenced path text, then using the result without canonicalization and an explicit containment check. Because directory-listing names were treated as ordinary file names, path components could alter the intended location. This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'). A local-work-directory boundary did not compensate for the missing validation of the remote operand.

The vulnerable pattern is constructing a filesystem or remote-file path by concatenating a trusted base directory with attacker-influenced path text, then using the result without canonicalization and an explicit containment check. Because directory-listing names were treated as ordinary file names, path components could alter the intended location. This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'). A local-work-directory boundary did not compensate for the missing validation of the remote operand.

Potential impact

  • Camel may read files outside the configured remote polling directory.
  • Camel may delete or rename remote files when the corresponding processing options are enabled.
  • Sensitive data may be disclosed through downloaded or otherwise processed files.
  • Files outside the intended directory may be altered, removed, or moved.
  • An attacker could cause unauthorized operations using the endpoint's remote credentials.
  • Route behavior or downstream processing may be disrupted through manipulated listing entries.
  • Camel may read files outside the configured remote polling directory.
  • Camel may delete or rename remote files when the corresponding processing options are enabled.
  • Sensitive data may be disclosed through downloaded or otherwise processed files.
  • Files outside the intended directory may be altered, removed, or moved.
  • An attacker could cause unauthorized operations using the endpoint's remote credentials.
  • Route behavior or downstream processing may be disrupted through manipulated listing entries.

General mitigation guidance

Mitigation generally focuses on treating remote listing names as untrusted input and enforcing the intended directory boundary for every remote operation.

Common defensive patterns include:

  • Normalize and canonicalize candidate paths before retrieval, deletion, or renaming.
  • Require the resolved path to remain beneath the configured polling directory, using a boundary-aware comparison rather than a simple string prefix.
  • Prefer APIs that accept validated single-segment file names when directory traversal is not a valid requirement.
  • Apply the same containment policy consistently across retrieval, deletion, move, preMove, moveFailed, and read-lock workflows.
  • Reduce trust in remote listings through authenticated, integrity-protected transport and controlled server tenancy.
  • Limit the remote account's permissions and confine it to the narrowest directory scope needed by the route.
  • Keep local download directories separately constrained and use least-privilege filesystem permissions.

Mitigation generally focuses on treating remote listing names as untrusted input and enforcing the intended directory boundary for every remote operation.

Common defensive patterns include:

  • Normalize and canonicalize candidate paths before retrieval, deletion, or renaming.
  • Require the resolved path to remain beneath the configured polling directory, using a boundary-aware comparison rather than a simple string prefix.
  • Prefer APIs that accept validated single-segment file names when directory traversal is not a valid requirement.
  • Apply the same containment policy consistently across retrieval, deletion, move, preMove, moveFailed, and read-lock workflows.
  • Reduce trust in remote listings through authenticated, integrity-protected transport and controlled server tenancy.
  • Limit the remote account's permissions and confine it to the narrowest directory scope needed by the route.
  • Keep local download directories separately constrained and use least-privilege filesystem permissions.

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules identifying concatenation of configured directories with listing-controlled names.
  • Code review checks for missing normalization, canonicalization, or base-directory containment validation.
  • Tests that supply parent-directory segments, absolute paths, alternate separators, and redundant path components in simulated listings.
  • Policy checks requiring the same path-boundary validation before every remote file operation.
  • Runtime monitoring for remote operations targeting paths outside the configured polling root.
  • Automated security review tools that flag path construction from remote, archive, or protocol-derived input.

Organizations can look for this weakness through:

  • Static analysis rules identifying concatenation of configured directories with listing-controlled names.
  • Code review checks for missing normalization, canonicalization, or base-directory containment validation.
  • Tests that supply parent-directory segments, absolute paths, alternate separators, and redundant path components in simulated listings.
  • Policy checks requiring the same path-boundary validation before every remote file operation.
  • Runtime monitoring for remote operations targeting paths outside the configured polling root.
  • Automated security review tools that flag path construction from remote, archive, or protocol-derived input.

Sources

SourceLink
camel.apache.orgcamel.apache.org/security/CVE-2026-79984.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-79984

Frequently asked

questions

It can be triggered through remote listing data when an attacker controls, compromises, or can tamper with the server or its directory response. Exploitation does not necessarily require access to the Camel host itself.

The key requirement is influence over a listing entry consumed by the route. The resulting operations use the permissions of the configured remote account, while crossing that account's own boundary depends on server-side confinement.

Normalize every candidate path and reject it unless the resolved result remains within the configured polling directory. Apply this check consistently to retrieval and all file-disposition operations.

Treat protocol-provided names as untrusted, use integrity-protected connections, enforce least privilege and server-side directory confinement, and include traversal-focused tests and static-analysis rules in the development process.

It can be triggered through remote listing data when an attacker controls, compromises, or can tamper with the server or its directory response. Exploitation does not necessarily require access to the Camel host itself.

The key requirement is influence over a listing entry consumed by the route. The resulting operations use the permissions of the configured remote account, while crossing that account's own boundary depends on server-side confinement.

Normalize every candidate path and reject it unless the resolved result remains within the configured polling directory. Apply this check consistently to retrieval and all file-disposition operations.

Treat protocol-provided names as untrusted, use integrity-protected connections, enforce least privilege and server-side directory confinement, and include traversal-focused tests and static-analysis rules in the development process.

Find out what's already
exploitable in your codebase.