CVE-2026-40047: Apache Camel-Docling Path Traversal Vulnerability

CRITICAL
Advisory Identifier: GHSA-rpv3-6645-2vqc
CVSS 9.1
CWE-88
Published
Advisory Summary

CVE-2026-40047 is a CRITICAL (CVSS 9.1) path traversal vulnerability (CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')) affecting Apache Camel-Docling libraries in the Maven ecosystem. The issue involves insufficient validation of custom cli arguments enables argument injection and path traversal in doclingproducer. Remediation is available by upgrading affected packages to version 4.18.3.

CVE-2026-40047 at a Glance

CVE Identifier CVE-2026-40047
GHSA Identifier GHSA-rpv3-6645-2vqc
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')
Affected Product Apache Camel-Docling
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-40047

To remediate this vulnerability, upgrade all affected Apache Camel-Docling dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.apache.camel:camel-docling fixed: 4.18.3
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-docling</artifactId>
    <version>4.18.3</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.apache.camel

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2026-40047, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.apache.camel

Analyze the terminal output to locate any version of Apache Camel-Docling in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.18.3), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.apache.camel command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection'), where the product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments, options, or switches within that command string. In Apache Camel-Docling, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') vulnerability in Apache Camel Docling component. The camel-docling component invokes the external `docling` command-line tool by assembling an argument list in DoclingProducer and executing it through java.lang.ProcessBuilder. Custom CLI arguments supplied through the `CamelDoclingCustomArguments` exchange header (a List<String>) were appended to that argument list with insufficient validation: the original implementation relied on a denylist of disallowed flags and only rejected path values that contained a literal `../` sequence. As a result, a Camel route that forwards externally-influenced data into the `CamelDoclingCustomArguments` header (or into the path-bearing headers used to build the invocation) could cause the producer to pass unrecognized or unintended `docling` CLI flags to the subprocess, and could supply path-like argument values that resolved outside the intended directory through traversal sequences not caught by the literal `../` check. Because Camel itself builds the `docling` invocation from these values, the component is responsible for constraining them, and the weak validation allowed CLI-argument injection and directory traversal in the arguments passed to the external tool. The invocation uses the list-based form of ProcessBuilder, so a shell does not interpret the argument values; OS command injection through shell metacharacters was not possible, and the metacharacter rejection added by the fix is defense-in-depth. This issue affects Apache Camel: from 4.15.0 before 4.18.3. Users are recommended to upgrade to a release that contains the CAMEL-23212 fix. On the mainline the fix is included from Apache Camel 4.19.0 (and later releases such as 4.20.0). For users on the 4.18.x LTS releases stream, upgrade to 4.18.3. The fix replaces the denylist with a strict allowlist of recognized `docling` CLI flags (rejecting any unrecognized flag, and rejecting producer-managed flags such as the output-directory flags), defensively rejects shell metacharacters in argument values, and normalizes path-like values with Path.normalize() before validating them so that traversal sequences which bypass a literal `../` check are detected. As defence in depth, route authors should avoid mapping untrusted message content into the `CamelDoclingCustomArguments` header and the path-bearing headers, and should strip Camel-internal headers from messages that arrive from untrusted producers.

CVE-2026-40047 Affected Apache Camel-Docling Versions

1 component(s)
Fixed Versions:
4.18.3
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.camel:camel-docling
Maven
≥ 4.15.0
< 4.18.3
4.18.3

References

Frequently Asked Questions

What is CVE-2026-40047?
CVE-2026-40047 is a security vulnerability in Apache Camel-Docling involving Insufficient validation of custom CLI arguments enables argument injection and path traversal in DoclingProducer under CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection').
Which Apache Camel-Docling versions are affected?
Affected versions include releases prior to 4.18.3 across affected packages: org.apache.camel:camel-docling.
What version fixes CVE-2026-40047?
Upgrading to 4.18.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is camel-docling affected?
Yes, org.apache.camel:camel-docling is affected in releases prior to 4.18.3. Upgrade your dependency to 4.18.3 or later.
What is the CVSS score of CVE-2026-40047?
CVE-2026-40047 has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2026-40047?
CVE-2026-40047 is classified under CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') (The product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments, options, or switches within that command string.).
How can I check Maven dependencies for CVE-2026-40047?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.camel'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rpv3-6645-2vqc",
  "modified" : "2026-08-26T14:32:48Z",
  "published" : "2026-07-06T09:30:28Z",
  "aliases" : [ "CVE-2026-40047" ],
  "summary" : "Apache Camel-Docling: Insufficient validation of custom CLI arguments enables argument injection and path traversal in DoclingProducer",
  "details" : "Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') vulnerability in Apache Camel Docling component.\n\nThe camel-docling component invokes the external `docling` command-line tool by assembling an argument list in DoclingProducer and executing it through java.lang.ProcessBuilder. Custom CLI arguments supplied through the `CamelDoclingCustomArguments` exchange header (a List<String>) were appended to that argument list with insufficient validation: the original implementation relied on a denylist of disallowed flags and only rejected path values that contained a literal `../` sequence. As a result, a Camel route that forwards externally-influenced data into the `CamelDoclingCustomArguments` header (or into the path-bearing headers used to build the invocation) could cause the producer to pass unrecognized or unintended `docling` CLI flags to the subprocess, and could supply path-like argument values that resolved outside the intended directory through traversal sequences not caught by the literal `../` check. Because Camel itself builds the `docling` invocation from these values, the component is responsible for constraining them, and the weak validation allowed CLI-argument injection and directory traversal in the arguments passed to the external tool. The invocation uses the list-based form of ProcessBuilder, so a shell does not interpret the argument values; OS command injection through shell metacharacters was not possible, and the metacharacter rejection added by the fix is defense-in-depth.\nThis issue affects Apache Camel: from 4.15.0 before 4.18.3.\n\nUsers are recommended to upgrade to a release that contains the CAMEL-23212 fix. On the mainline the fix is included from Apache Camel 4.19.0 (and later releases such as 4.20.0). For users on the 4.18.x LTS releases stream, upgrade to 4.18.3. The fix replaces the denylist with a strict allowlist of recognized `docling` CLI flags (rejecting any unrecognized flag, and rejecting producer-managed flags such as the output-directory flags), defensively rejects shell metacharacters in argument values, and normalizes path-like values with Path.normalize() before validating them so that traversal sequences which bypass a literal `../` check are detected. As defence in depth, route authors should avoid mapping untrusted message content into the `CamelDoclingCustomArguments` header and the path-bearing headers, and should strip Camel-internal headers from messages that arrive from untrusted producers.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.camel:camel-docling"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.15.0"
      }, {
        "fixed" : "4.18.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-40047"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/camel/pull/22082"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/camel/pull/22767"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/camel/commit/1fa56f45901f50aa79849ff2d2ca83dd57f6991c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/camel/commit/f86fda0442c65b9d13ce3aa8ac676233b64e3351"
  }, {
    "type" : "WEB",
    "url" : "https://camel.apache.org/security/CVE-2026-40047.html"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/camel"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/camel/releases/tag/camel-4.18.3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/camel/releases/tag/camel-4.19.0"
  }, {
    "type" : "WEB",
    "url" : "https://issues.apache.org/jira/browse/CAMEL-23212"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2026/07/05/2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-88" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-26T14:32:48Z",
    "nvd_published_at" : "2026-07-06T09:16:35Z"
  }
}