{"answers":{"affected":"2 open source packages ship an affected version, including org.apache.camel:camel-docling. It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-40047 in the wild and no public exploit code.","fix":"Upgrade org.apache.camel:camel-docling to 4.18.3 or later.","what":"CVE-2026-40047 is a critical command injection vulnerability in Apache Camel, published on 6 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-40047 and fix it if it is affected.\n\nWhat it is: CVE-2026-40047 is a critical command injection vulnerability in Apache Camel, published on 6 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-40047 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- org.apache.camel:camel-docling (Maven): affected from 4.15.0; fixed in 4.18.3\n- org.apache.camel:camel-docling (Maven): affected from 4.15.0; fixed in 4.18.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-40047/ (Markdown: https://insights.sbomify.com/CVE-2026-40047/index.md)","id":"CVE-2026-40047","markdown":"https://insights.sbomify.com/CVE-2026-40047/index.md","name":"CVE-2026-40047","record":{"aliases":["GHSA-rpv3-6645-2vqc"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Apache Camel library","requires_auth":"none","summary":"Attackers can inject CLI arguments and traverse directories in Apache Camel Docling component, potentially leading to code execution or data exposure.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"apache","cpe":[{"product":"camel","vendor":"apache"}],"cvss":{"score":9.1,"severity":"critical","source":"cisa-adp","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-88","name":"Improper Neutralization of Argument Delimiters in a Command"}],"description":"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\u003cString\u003e) 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.","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":"2026-07-08","github_poc":1,"max_poc_stars":2,"metasploit":0,"nuclei":0,"refs":[{"date":"2026-07-08T10:58:16Z","kind":"github_poc","ref":"https://github.com/oscerd/CVE-2026-40047","stars":2,"title":"Reproducer for CVE-2026-40047: Apache Camel camel-docling CLI argument injection / path traversal"}],"tier":"poc_unverified"},"has_fix":true,"headline":"Apache Camel-Docling: Insufficient validation of custom CLI arguments enables argument injection and path traversal in DoclingProducer","id":"CVE-2026-40047","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":"apache:camel","products":["apache:camel"],"type":"command_injection","year":"2026"},"n_packages":2,"n_references":1,"next":{"headline":"Apache Camel PQC: Unsafe Deserialization from FileBasedKeyLifecycleManager","id":"CVE-2026-40048"},"packages":[{"ecosystem":"Maven","fixed":["4.18.3"],"introduced":["4.15.0"],"last_affected":[],"package":"org.apache.camel:camel-docling","purl":null,"source":"GHSA-rpv3-6645-2vqc"},{"ecosystem":"Maven","fixed":["4.18.3"],"introduced":["4.15.0"],"last_affected":[],"package":"org.apache.camel:camel-docling","purl":"pkg:maven/org.apache.camel/camel-docling","source":"GHSA-rpv3-6645-2vqc"}],"prev":{"headline":"Apache ActiveMQ, Apache ActiveMQ All, Apache ActiveMQ MQTT vulnerable to Integer Overflow or Wraparound","id":"CVE-2026-40046"},"products":["Apache Camel"],"published":"2026-07-06","related":[{"cvss_score":10,"headline":"Apache camel-coap allows header injection that can lead to remote code execution","id":"CVE-2026-33453","kev_date_added":null,"published":"2026-04-27"},{"cvss_score":9.9,"headline":"Apache Camel has an incomplete fix for CVE-2025-27636","id":"CVE-2026-40453","kev_date_added":null,"published":"2026-04-27"},{"cvss_score":9.8,"headline":"Apache Camel K: Camel K Tenant repositories reach Maven execution inside operator pod","id":"CVE-2026-80351","kev_date_added":null,"published":"2026-09-10"},{"cvss_score":9.8,"headline":"Apache Camel K: Camel K Master trait serviceAccountName YAML injection lets CR author apply arbitrary objects","id":"CVE-2026-80352","kev_date_added":null,"published":"2026-09-10"},{"cvss_score":9.8,"headline":"Apache Camel: Camel-Atmosphere-Websocket: WebSocket dispatch header injection","id":"CVE-2026-71300","kev_date_added":null,"published":"2026-08-24"},{"cvss_score":9.8,"headline":"Apache Camel-Undertow: the endpoint discarded the undertow-specific header filter strategy in favour of the base HTTP one, so the undertow filtering never ran on endpoint-configured routes","id":"CVE-2026-78329","kev_date_added":null,"published":"2026-08-24"},{"cvss_score":9.8,"headline":"Apache Camel-PQC: The AWS Secrets Manager key-lifecycle manager deserializes persisted key metadata with java.io.ObjectInputStream and no ObjectInputFilter","id":"CVE-2026-43867","kev_date_added":null,"published":"2026-07-06"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-07-06","vendors":["Apache Software Foundation"]},"summary":"Attackers can inject CLI arguments and traverse directories in Apache Camel Docling component, potentially leading to code execution or data exposure.","url":"https://insights.sbomify.com/CVE-2026-40047/"}