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



This issue affects Apache Camel: from 4.15.0 before 4.18.5, from 4.19.0 before 4.22.2.



DoclingProducer builds the command line of the external docling tool and appends to it the custom arguments supplied in the CamelDoclingCustomArguments header, a list of strings whose flags the fix for CVE-2026-40047 restricted to an allowlist. That fix also introduced validatePathSafety to keep path-like argument values inside the intended directory, but the method only looked for relative traversal: it rejected a value containing a traversal sequence such as ../ and a value whose normalized form still held a .. element. It never checked whether a value was an absolute path, and an absolute path without traversal segments contains neither, so it passed unchanged. Every path-like value went through this check, whether it was a separate list element following its flag or was attached to the flag after an equals sign, so an absolute path was accepted in either form, for example as the directory given to the allowlisted --artifacts-path flag, which tells docling where to find its model artifacts. Such a value reached the docling command line as given, so a party able to choose the custom arguments could point the docling process at any directory the Camel process can access, outside the working directory that the check was meant to keep path values in, which is the outcome the CVE-2026-40047 fix set out to prevent. Only the CLI mode, which is the default, passes custom arguments to docling. The header belongs to the Camel header namespace, which consumers applying Camel's default header filtering, such as the JMS and Kafka consumers, remove from incoming messages, so the issue is reached where a route forwards externally influenced values into the header or where a consumer maps incoming headers without that filtering.



Users are recommended to upgrade to version 4.23.0, which fixes the issue. If users are on the 4.22.x releases stream, then they are suggested to upgrade to 4.22.2. If users are on the 4.18.x releases stream, then they are suggested to upgrade to 4.18.5. The 4.15.x to 4.17.x and 4.19.x to 4.21.x release lines reached end of life before this issue was resolved and will not receive a fix, so deployments on them must move to a supported release. For deployments that cannot upgrade immediately, do not build the CamelDoclingCustomArguments header from values that originate outside the deployment, remove that header from messages that arrive from outside before they reach a docling endpoint, and make sure that consumers which map incoming message headers drop the Camel header namespace, so that only the route itself chooses the custom arguments.
Published: 2026-10-26
Score: 5.4 Medium
EPSS: n/a
KEV: No
Impact: Path Traversal Leading to Arbitrary Directory Access
Action: Patch
AI Analysis

Impact

Apache Camel's Docling component suffers from an incomplete path validation flaw. The validatePathSafety helper, introduced to block traversal sequences, fails to detect absolute path values. As a result, an attacker can inject custom arguments that point the external docling tool at any directory the Camel process can read, effectively bypassing the intended working-directory restriction. This enables a privilege‑escape style attack that could expose arbitrary files or configuration data.

Affected Systems

Apache Camel versions 4.15.0 through 4.18.4, 4.19.0 through 4.22.1, and 4.22.x before the 4.22.2 release are vulnerable. The issue applies across the Apache Camel project maintained by the Apache Software Foundation.

Risk and Exploitability

The CVSS score of 5.4 classifies this as a moderate severity vulnerability. Although the EPSS score is unavailable, the vulnerability is not listed in the CISA KEV catalog, suggesting low yet plausible exploitation risk. Attackers can trigger the flaw by supplying a crafted CamelDoclingCustomArguments header in a message that bypasses header filtering (e.g., JMS or Kafka consumers). Because the flaw only requires manipulating header values, the attack effort is low, and the potential impact includes unauthorized access to files outside the intended directory.

Generated by OpenCVE AI on October 26, 2026 at 10:23 UTC.

Remediation

Vendor Solution

Upgrade to Apache Camel 4.23.0, which fixes the issue. Users on the 4.22.x stream should upgrade to 4.22.2 and users on the 4.18.x stream should upgrade to 4.18.5. The validatePathSafety helper now also rejects a path-like custom-argument value that is an absolute path, whether it is given as a separate list element or attached to its flag, so every path-valued flag on the allowlist is covered; a relative value without traversal segments is still accepted. The 4.15.x to 4.17.x and 4.19.x to 4.21.x release lines reached end of life before this issue was resolved and will not receive a fix, so deployments on them must move to a supported release.


Vendor Workaround

Do not build the CamelDoclingCustomArguments header from values that originate outside the deployment, remove that header from messages that arrive from outside before they reach a docling endpoint, and make sure that consumers which map incoming message headers drop the Camel header namespace, so that only the route itself chooses the custom arguments.


OpenCVE Recommended Actions

  • Upgrade Apache Camel to the latest supported release that fixes the issue – 4.23.0, or 4.22.2 for 4.22.x streams, or 4.18.5 for 4.18.x streams.
  • If an upgrade is not immediately possible, avoid constructing CamelDoclingCustomArguments headers from data supplied by external sources.
  • Remove or strip the CamelDoclingCustomArguments header from inbound messages before they reach a docling endpoint.
  • Ensure that consumers mapping inbound headers drop the Camel header namespace so that only the route itself can inject custom arguments.

Generated by OpenCVE AI on October 26, 2026 at 10:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 26 Oct 2026 09:00:00 +0000

Type Values Removed Values Added
Description Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Apache Camel Docling component. This issue affects Apache Camel: from 4.15.0 before 4.18.5, from 4.19.0 before 4.22.2. DoclingProducer builds the command line of the external docling tool and appends to it the custom arguments supplied in the CamelDoclingCustomArguments header, a list of strings whose flags the fix for CVE-2026-40047 restricted to an allowlist. That fix also introduced validatePathSafety to keep path-like argument values inside the intended directory, but the method only looked for relative traversal: it rejected a value containing a traversal sequence such as ../ and a value whose normalized form still held a .. element. It never checked whether a value was an absolute path, and an absolute path without traversal segments contains neither, so it passed unchanged. Every path-like value went through this check, whether it was a separate list element following its flag or was attached to the flag after an equals sign, so an absolute path was accepted in either form, for example as the directory given to the allowlisted --artifacts-path flag, which tells docling where to find its model artifacts. Such a value reached the docling command line as given, so a party able to choose the custom arguments could point the docling process at any directory the Camel process can access, outside the working directory that the check was meant to keep path values in, which is the outcome the CVE-2026-40047 fix set out to prevent. Only the CLI mode, which is the default, passes custom arguments to docling. The header belongs to the Camel header namespace, which consumers applying Camel's default header filtering, such as the JMS and Kafka consumers, remove from incoming messages, so the issue is reached where a route forwards externally influenced values into the header or where a consumer maps incoming headers without that filtering. Users are recommended to upgrade to version 4.23.0, which fixes the issue. If users are on the 4.22.x releases stream, then they are suggested to upgrade to 4.22.2. If users are on the 4.18.x releases stream, then they are suggested to upgrade to 4.18.5. The 4.15.x to 4.17.x and 4.19.x to 4.21.x release lines reached end of life before this issue was resolved and will not receive a fix, so deployments on them must move to a supported release. For deployments that cannot upgrade immediately, do not build the CamelDoclingCustomArguments header from values that originate outside the deployment, remove that header from messages that arrive from outside before they reach a docling endpoint, and make sure that consumers which map incoming message headers drop the Camel header namespace, so that only the route itself chooses the custom arguments.
Title Apache Camel: Camel-Docling Custom CLI Argument Path Validation Does Not Reject Absolute Paths (Incomplete Fix of CVE-2026-40047)
Weaknesses CWE-22
References
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: apache

Published:

Updated: 2026-10-26T08:48:48.344Z

Reserved: 2026-09-22T11:01:34.300Z

Link: CVE-2026-95628

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-26T09:16:36.587

Modified: 2026-10-26T09:16:36.587

Link: CVE-2026-95628

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-26T10:30:10Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')