cve.bz

CVE-2026-40047 apache camel: Argument Injection

9.1 criticalEPSS 2.4%Fix available

Critical (9.1) in apache camel. EPSS 2.4% estimated probability of exploitation activity in the next 30 days. Fixed in org.apache.camel:camel-docling 4.18.3.

On this page
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.

Severity

CVSS 3.1

9.1 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
EPSS
2.4% (unchanged from 2.4% a week ago; 2.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 85th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-07-06. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-88 Improper Neutralization of Argument Delimiters in a Command (Argument Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-40047 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-40047?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-40047?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-40047 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2026-40047

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2026-40047](https://cve.bz/cve/badge/CVE-2026-40047.svg)](https://cve.bz/cve/CVE-2026-40047)

HTML:

<a href="https://cve.bz/cve/CVE-2026-40047"><img src="https://cve.bz/cve/badge/CVE-2026-40047.svg" alt="CVE-2026-40047"></a>

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Apache Software Foundation Apache Camelfrom 4.15.0 before 4.18.3

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-rpv3-6645-2vqcMavenorg.apache.camel:camel-docling>=4.15.0 <4.18.34.18.3

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

A flaw was found in the Apache Camel Docling component. The DoclingProducer accepts custom CLI arguments via the CamelDoclingCustomArguments Exchange header with insufficient validation, allowing argument injection and path traversal. An attacker who can send HTTP requests to a Camel route using the docling producer can inject arbitrary CLI flags or access files outside the intended directory. Red Hat builds of Apache Camel for Spring Boot and Quarkus ship this component.

Red Hat's mitigation

For deployments that cannot upgrade immediately, strip the CamelDoclingCustomArguments header from inbound HTTP messages before the docling producer (for example removeHeaders('CamelDocling*') at the start of the route). Additionally, restrict HTTP endpoint access with authentication.

ProductPackageStateAdvisory
Red Hat build of Apache Camel 4 for Quarkus 3camel-doclingFix deferred
Red Hat build of Apache Camel for Spring Boot 4camel-doclingFix deferred

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-40047.

GitHub PoC

Repositories on GitHub named after this CVE or listed for it by the PoC-in-GitHub index. For those marked Harbor Check: matches CVE, Flawharbor read the code and found it implements this CVE's exploitation technique: read, not run, and its dependencies only checked for warning signs, so a pointer and no guarantee. The rest are unverified: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it.

  • oscerd/CVE-2026-40047 Harbor Check: matches CVE 2 stars, Java, created
    Reproducer for CVE-2026-40047: Apache Camel camel-docling CLI argument injection / path traversal

Attack patterns (CAPEC)

  • CAPEC-41 Using Meta-characters in E-mail Headers to Inject Malicious Payloads Likelihood: High · Severity: High
  • CAPEC-88 OS Command Injection Likelihood: High · Severity: High
  • CAPEC-137 Parameter Injection Likelihood: Medium · Severity: Medium
  • CAPEC-174 Flash Parameter Injection Likelihood: High · Severity: Medium
  • CAPEC-460 HTTP Parameter Pollution (HPP) Severity: Medium

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON