# CVE-2026-79985: Apache Camel: camel-smb resolved the remote path of a polled file from the name reported in the server directory listing without constraining it to the directory being polled, so a listing entry containing traversal segments could be moved outside

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.4
- **CVSS:** 7.4 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.53% (percentile 38, 2026-11-26)
- **CWE:** CWE-22
- **Published:** 2026-10-19T10:16:14.300Z
- **Modified:** 2026-10-20T14:17:02.867Z

## Who should check

- Anyone running Apache Software Foundation Apache Camel \>= 4.2.0, \< 4.18.5; \>= 4.19.0, \< 4.22.1

## Description

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Apache Camel SMB component.



This issue affects Apache Camel: from 4.2.0 before 4.18.5, from 4.19.0 before 4.22.1.



The Camel remote-file consumers poll a directory on a remote server and build the absolute remote path of each file by concatenating the configured directory with the file name reported in the server's directory listing. That concatenation (FtpUtils.absoluteFilePath and GenericFileConsumer) applied no lexical normalization and no check that the result stayed inside the directory being polled, and the resulting path became the operand for every subsequent remote operation on the file: retrieval (FtpOperations.retrieveFile / SftpOperations, reached from GenericFileConsumer where the retrieve name is taken verbatim from GenericFile.getAbsoluteFilePath), deletion when delete=true (GenericFileDeleteProcessStrategy), and renaming when move, preMove, moveFailed or readLock=rename is configured (GenericFileProcessStrategySupport and GenericFileRenameExclusiveReadLockStrategy). Neither isValidFile nor isMatched performed any containment check. A listing entry that is not a single path segment therefore resolved to a path outside the configured polling directory, causing Camel to read, delete or rename files outside it using the endpoint's own credentials. A listing name is not route-controlled data. It is supplied by the remote server, and the FTP control channel carries no integrity protection at all, so an on-path attacker can rewrite a LIST response without holding any credentials; a compromised, malicious or multi-tenant server, or a server backed by a virtual filesystem, can emit such a name directly. Retrieval is reachable in a default consumer configuration, since the remote consumers download every listed file; deletion and renaming additionally require one of the disposition options above, all of which are common. Escape from the directory Camel was configured to poll is unconditional, while escape from the server's own account boundary additionally depends on whether that server confines the account. The jailStartingDirectory option, which is documented as restricting Camel to the starting directory and is enabled by default, governed producer writes and, since the localWorkDirectory containment work, consumer downloads to the local work directory - but it did not constrain this remote operand, so its name and description claimed a boundary that was not enforced here. The same entry point had already been recognised on the local side: the localWorkDirectory download path was constrained so that a remote file name containing parent-directory segments could not resolve outside the local work directory. The remote operand was the remaining half of that surface. This artifact provides the smb scheme. Its consumer walks the share listing on its own rather than through RemoteFileConsumer, skipping only the exact "." and ".." entries, so a name carrying traversal segments in any other form was concatenated unchecked. Reaching it requires a server that emits a listing name which is not a single path segment, which a conforming SMB2 implementation does not do; the exposure was corrected on the same basis as the other remote-file consumers rather than from a demonstrated proof of concept against this scheme.



Upgrade to Apache Camel 4.23.0, which fixes the issue. Users on the 4.22.x releases stream should upgrade to 4.22.1. Users on the 4.18.x LTS releases stream should upgrade to 4.18.5. The 4.14.x stream reached end of life and does not receive this fix; users on it should move to a supported releases stream.

## Affected and fixed versions

- Apache Software Foundation Apache Camel: \>= 4.2.0, \< 4.18.5; \>= 4.19.0, \< 4.22.1 (cvelist)

## Mitigation

- Upgrade Apache Camel to 4.22.1 or later.
- Vendor workaround: For deployments that cannot upgrade immediately, require SMB signing, and encryption where the dialect supports it, so that a share listing cannot be rewritten in transit, and point the endpoint only at shares whose server is trusted. Constrain the consumer with the filter, antInclude or include options so that only simple single-segment file names are accepted, and avoid enabling delete=true, move, preMove, moveFailed or readLock=rename on endpoints pointing at a server whose listing content is not fully trusted, since those options are what turn the issue from a read into a destructive operation. Where the server supports it, confine the account used by the endpoint to the polled directory, so that the server itself enforces the boundary independently of Camel. As defence in depth, treat file names reported by any remote server outside the route's trust boundary as untrusted input.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-79985. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-79985.md
Affected: Apache Software Foundation Apache Camel >= 4.2.0, < 4.18.5; >= 4.19.0, < 4.22.1
Fixed in: Apache Software Foundation Apache Camel 4.18.5, Apache Software Foundation Apache Camel 4.22.1

Steps:
1. Search this machine and project for Apache Software Foundation Apache Camel: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-79985 being exploited?

There is no confirmed exploitation: CVE-2026-79985 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 0.53% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-79985?

High: CVSS 7.4 (v3.1, scored by CNA). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2026-79985?

Apache Software Foundation Apache Camel \>= 4.2.0, \< 4.18.5; \>= 4.19.0, \< 4.22.1.

### Is there a fix for CVE-2026-79985?

Yes. Fixed in Apache Software Foundation Apache Camel 4.18.5, Apache Software Foundation Apache Camel 4.22.1. Upgrade Apache Camel to 4.22.1 or later. Vendor workaround: For deployments that cannot upgrade immediately, require SMB signing, and encryption where the dialect supports it, so that a share listing cannot be rewritten in transit, and point the endpoint only at shares whose server is trusted. Constrain the consumer with the filter, antInclude or include options so that only simple single-segment file names are accepted, and avoid enabling delete=true, move, preMove, moveFailed or readLock=rename on endpoints pointing at a server whose listing content is not fully trusted, since those options are what turn the issue from a read into a destructive operation. Where the server supports it, confine the account used by the endpoint to the polled directory, so that the server itself enforces the boundary independently of Camel. As defence in depth, treat file names reported by any remote server outside the route's trust boundary as untrusted input.

### How do I check if I'm affected by CVE-2026-79985?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://camel.apache.org/security/CVE-2026-79985.html>
- patch: <https://github.com/apache/camel/pull/25730>
- patch: <https://github.com/apache/camel/pull/25745>
- patch: <https://github.com/apache/camel/pull/25746>
- patch: <https://github.com/apache/camel/pull/25747>
- exploit: <https://github.com/oscerd/CVE-2026-79985>
- other: <https://issues.apache.org/jira/browse/CAMEL-24487>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-79985>

HTML: <https://flawdb.com/CVE-2026-79985> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-79985>
