
Runnable Spring Boot proof-of-concept reproducing CVE-2026-103873, where camel-spring-ws leaks Camel-internal headers into outbound SOAP responses; includes fix verification.
Runnable proof-of-concept reproducer for the Apache Camel vulnerability where the configured
HeaderFilterStrategy was not applied to outbound SOAP responses, so Camel-internal headers set on the
exchange during routing were copied into the SOAP response returned to the remote client.
| Runtime | Directory | Stack |
|---|---|---|
| Camel Spring Boot | camel-spring-boot/ | Spring Boot 3.5.13 + camel-spring-ws 4.22.1 |
Camel Spring Boot only.
camel-spring-wsbuilds on Spring Web Services; there is nocamel-quarkus-spring-wsextension, verified against the Camel Quarkus 3.39.0 source tree and its BOM.
The route is an ordinary SOAP service that accumulates the internal state any route accumulates, and returns one header it genuinely means to return:
from("spring-ws:rootqname:{http://example.com/demo}GetStatusRequest?endpointMapping=#endpointMapping")
.setHeader("CamelFileName", constant("/var/spool/camel/in/order-8841.xml"))
.setHeader("CamelHttpUri", constant("http://orders.internal:8080/backend/v2/status"))
.setHeader("CamelRedelivered", constant("false"))
.setHeader("CorrelationId", constant("corr-8841")) // this one is meant to go back
.setBody(...);
cd camel-spring-boot
mvn clean package
docker compose up -d --build
until [ "$(curl -s http://localhost:8080/exploit/ready)" = "Started" ]; do sleep 1; done
curl -s http://localhost:8080/exploit/attack
docker compose down
The client sends a plain SOAP request with no headers of its own, and the reply comes back carrying the route's internal state in its SOAP header:
<SOAP-ENV:Header CamelFileName="/var/spool/camel/in/order-8841.xml"
CamelHttpUri="http://orders.internal:8080/backend/v2/status"
CamelRedelivered="false"
CorrelationId="corr-8841"
org.apache.camel.demo.internalAccount="svc-orders"/>
A remote client therefore learns the local path of a file the route had read, an internal backend URI, and
whatever else routing left on the exchange. BasicMessageFilter.doProcessSoapHeader() copied every exchange
header into the outbound SOAP header; the inbound direction was already filtered, only the response was not.
| Property | Value |
|---|---|
| Component | camel-spring-ws (BasicMessageFilter) |
| CWE | Exposure of internal state to an unauthorized actor |
| Severity | Medium |
| Attack vector | Any SOAP request to a spring-ws consumer whose route sets Camel-internal headers |
| Impact | A remote client observes internal routing state: local file paths, backend URIs, redelivery flags |
| Affected Versions | 4.0.0 before 4.18.6; 4.19.0 before 4.22.2 |
| Fixed Versions | 4.18.6, 4.22.2, 4.23.0 |
| JIRA | CAMEL-25340 |
| Credit | Andrea Cosentino from Apache Software Foundation |
Advisory: https://camel.apache.org/security/CVE-2026-103873.html
As a workaround on an affected release, a removeHeaders EIP before the response is produced strips the
internal headers.
Set camel.version to 4.22.2 and run it again. Verified against 4.22.1 -> 4.22.2:
Internal header names found in the response envelope:
- org.apache.camel.demo.internalAccount (org.apache.camel.* namespace, set by this application)
The header the service does mean to return (CorrelationId) is present: true
>>> NOT reproduced: no Camel*/camel* header reached the response.
The three Camel* headers are gone and CorrelationId still comes back, so the fix closes the disclosure
without eating headers the service means to return.
The org.apache.camel.* header is still returned. The filter the fix applies is
DefaultHeaderFilterStrategy's CAMEL_FILTER_STARTS_WITH, which is {"Camel", "camel"}, so a name
beginning with org.apache.camel. falls outside it - although the advisory names that prefix as part of the
internal namespace, and Camel's own hardening guidance is to strip both Camel* and org.apache.camel.*.
Scope it honestly: no header Camel itself sets uses that prefix (the matches in the codebase are class
names and one system property), so this is a coverage gap against the stated namespace rather than a
continuing leak of Camel's own routing state. It bites only an application that names its own headers that
way, as this route deliberately does, and removeHeaders("org.apache.camel.*") handles that case. The
driver reports it separately for exactly that reason, instead of folding it into the verdict.
A real SOAP service: Spring Boot's auto-configured MessageDispatcherServlet on /services, a
CamelEndpointMapping, and the route above. The driver posts a real SOAP envelope over HTTP and prints the
response verbatim, so the disclosure is observed the way a remote client would observe it.
Two things worth knowing if you adapt this. Camel's spring-ws consumer is a Spring-WS
MessageEndpoint, so the dispatcher needs aMessageEndpointAdapterbean; without it every request returns a SOAP fault saying "No adapter for endpoint". And the driver refuses to print a verdict when the response is not a normal HTTP 200 - a service that answers with a fault proves nothing either way, and an earlier run of this reproducer reported a confident "NOT reproduced" from exactly that state.
This repository is published for educational and defensive purposes: to help Apache Camel users understand the vulnerability, verify whether they are affected, and confirm that upgrading resolves it. Do not use this material against systems you do not own or operate.