
Reproducer for CVE-2026-46584: Apache Camel camel-mail mail.smtp.* header injection enabling credential theft via on-path SOCKS interception (fixed in 4.14.8/4.18.3/4.21.0)
| Runtime | Directory | Stack |
|---|
| Camel Spring Boot | camel-spring-boot/ | Spring Boot 3.2.0 + camel-spring-boot 4.18.2 |
| Camel Quarkus | camel-quarkus/ | Quarkus 3.36.0 + Camel Quarkus 3.36.0 (bundles Camel 4.20.0) |
Both are affected versions (fixed in 4.14.8 / 4.18.3 / 4.21.0), and both demonstrate the identical defect: the
mail producer's getSender() folds any inbound mail.smtp.* message header into the JavaMail session before
connecting. Those names are bare, non-Camel-prefixed strings, so the HTTP boundary filter
(HttpHeaderFilterStrategy, which strips only Camel*) lets an unauthenticated HTTP client set them. Two extra
request headers (mail.smtp.socks.host / mail.smtp.socks.port) tunnel the victim's authenticated SMTP
connection through an attacker-controlled SOCKS proxy, which harvests the plaintext AUTH LOGIN credentials —
while the victim's send still succeeds, so the interception is silent.
Each subdirectory is a self-contained project with its own Dockerfile, docker-compose.yml, and README — the
"legit" SMTP server and the attacker's SOCKS proxy both run in-JVM, so no external service is required. In short,
for either:
cd camel-spring-boot # or: cd camel-quarkus
mvn clean package
docker compose up -d --build
curl -s http://localhost:8080/exploit/attack
docker compose down
| Property | Value |
|---|---|
| Component | camel-mail |
| CWE | CWE-20 (Improper Input Validation) / CWE-200 (Information Exposure) |
| Impact | Inbound mail.smtp.* headers rewrite the JavaMail session → transport interception, credential theft, trust/TLS weakening |
| Affected Versions | From 4.0.0 before 4.14.8, from 4.15.0 before 4.18.3, from 4.19.0 before 4.21.0 |
| Fixed Versions | 4.14.8, 4.18.3, 4.21.0 |
| JIRA | CAMEL-23522 |
These reproducers are provided for security research and authorized testing only, for a publicly disclosed and fixed vulnerability. Do not use them against systems without explicit permission.