WaratekVRT Sign in

CVE-2026-40047 Apache Camel

Affected softwareApache Camel
Severity9.1 Critical CVSS 3.1
Fixed in4.18.3
WeaknessCWE-88
Published6 Jul 2026
Updated25 Oct 2026

Description

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.

Exploitation status

No public exploit

No exploit has been reported in the sources we check. The 1 repository below are public GitHub repositories with fewer than 5 stars.

  • CISA KEV not listed
  • VulnCheck KEV not listed
  • CISA Vulnrichment exploitation: none
  • Indexed PoC 1 indexed, none at 5+ stars
  • EPSS 2.4% chance in 30 days

1 of these are GitHub repositories with fewer than 5 stars. They are listed for reference and don't count toward the exploitation status above.

IndexArtifactStarsFirst seen
GitHub PoC Reproducer for CVE-2026-40047: Apache Camel camel-docling CLI argument injection / path traversal 2 2026-07-08

Waratek protection

Protected by Waratek

Waratek has a rule that blocks attacks on this vulnerability.

Decided by A vulnerability class already blocked by an ARMR security rule
Finding Protected by Waratek's ARMR path-traversal security rule, which blocks this class of attack at the JVM level without a rule written for this CVE specifically. The CVE's description identifies a directory traversal vulnerability. Matched by description (CWE-88 was assigned, but does not settle the class on its own).

How to mitigate CVE-2026-40047

Upgrade Apache Camel to 4.18.3 or later. Until you can, Waratek RASP blocks exploitation with its path traversal rule. It runs inside the Java application, with no code changes.

Waratek RASP Runtime protection for Java applications

Affected software and releases

Maven packages

Affected and fixed versions, from OSV.dev
PackageIntroducedFixedLast affected
org.apache.camel:camel-docling 4.15.0 4.18.3 unbounded

Products and versions

2 products, 2 version entries
SourceVendorProductSchemeAffected versions
nvd apache camel generic ≥ 4.15.0 and < 4.18.3
osv org.apache.camel camel-docling generic ≥ 4.15.0 and < 4.18.3

References

URLTags
https://github.com/apache/camel/pull/22082 WEB
https://github.com/apache/camel/pull/22767 WEB
https://github.com/apache/camel/commit/1fa56f45901f50aa79849ff2d2ca83dd57f6991c WEB
https://github.com/apache/camel/commit/f86fda0442c65b9d13ce3aa8ac676233b64e3351 WEB
https://camel.apache.org/security/CVE-2026-40047.html WEB
https://github.com/apache/camel PACKAGE
https://github.com/apache/camel/releases/tag/camel-4.18.3 WEB
https://github.com/apache/camel/releases/tag/camel-4.19.0 WEB
https://issues.apache.org/jira/browse/CAMEL-23212 WEB
http://www.openwall.com/lists/oss-security/2026/07/05/2 WEB

Timeline

Published2026-07-06By the CVE Program.
NVD record modified2026-10-25NVD's own last-modified date for this record.