LOW 3.7

CVE-2026-46584: Apache Camel Mail Component Input Validation Vulnerability

Apache Camel's mail component has an input validation flaw that allows untrusted data to override email sending configuration. If a Camel route accepts input from external sources (like HTTP requests or message queues) and passes it directly to an SMTP/SMTPS producer without filtering, an attacker can inject malicious mail configuration headers. On older versions (before 4.19.0), this could redirect email traffic to attacker-controlled servers, exposing configured SMTP credentials. On newer versions, the attack is limited to weakening security settings or intercepting message content. The vulnerability only materializes in routes that lack proper input sanitization.

Source data · NVD / CISA · public domain

CVSS
3.1 · 3.7 LOW · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
Weaknesses (CWE)
CWE-20, CWE-200
Affected products
1 configuration(s)
Published / Modified
2026-07-06 / 2026-07-08

NVD description (verbatim)

Improper Input Validation, Exposure of Sensitive Information to an Unauthorized Actor vulnerability in Apache Camel Mail Component. The camel-mail producer (MailProducer.getSender) scanned the outgoing Exchange for message headers in the mail.smtp. / mail.smtps. namespace and, when any were present, built a per-message JavaMail sender with those values applied as JavaMail session properties, overriding the endpoint configuration. This namespace is Camel-internal - only MailProducer interprets it - and was not blocked by any HeaderFilterStrategy, so the values could originate from any inbound protocol (for example platform-http query parameters or request headers, or JMS / Kafka messages from untrusted producers) that feeds a route ending in an smtp / smtps producer without an intervening removeHeaders. The maximal impact is version-dependent: on releases before 4.19.0, setting mail.smtp.host redirects the SMTP connection to a server under the attacker's control, and because the producer then authenticates with the endpoint's configured username and password those credentials are transmitted to the attacker; on 4.19.0 and later the producer connects to the endpoint's configured host explicitly, so the reachable impact is limited to weakening transport security (for example mail.smtp.ssl.trust, mail.smtp.starttls.enable or mail.smtp.socks.host) and interception of the outgoing message rather than host redirect. Exploitation requires a route that channels untrusted input into the mail producer without stripping the namespace. This issue affects Apache Camel: from 4.0.0 before 4.14.8, from 4.15.0 before 4.18.3, from 4.19.0 before 4.21.0. Users are recommended to upgrade to version 4.21.0, which fixes the issue. If users are on the 4.14.x LTS releases stream, then they are suggested to upgrade to 4.14.8. If users are on the 4.18.x releases stream, then they are suggested to upgrade to 4.18.3. After upgrading, the per-message override is disabled by default; enable it only on trusted endpoints with useJavaMailSessionPropertiesFromHeaders=true. For deployments that cannot upgrade immediately, strip the namespace before the mail producer with removeHeaders('mail.smtp.*') and removeHeaders('mail.smtps.*') between any untrusted ingress and the smtp / smtps producer. Even with the opt-in enabled, route authors should still strip the namespace on any path that carries untrusted input.

2 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The MailProducer.getSender method interprets Camel-internal mail.smtp.* and mail.smtps.* headers as JavaMail session properties, applying them per-message without validation or filtering. These namespaces are not enforced by HeaderFilterStrategy, allowing headers from untrusted inbound protocols (HTTP query parameters, request headers, JMS/Kafka messages) to propagate through routes and override SMTP endpoint configuration. On versions before 4.19.0, mail.smtp.host injection enables credential exfiltration by redirecting connections to attacker infrastructure. Versions 4.19.0+ lock the host to the configured endpoint, but mail.smtp.ssl.trust, mail.smtp.starttls.enable, and mail.smtp.socks.host remain exploitable for weakening TLS enforcement or routing through attacker proxies. Exploitation requires a route path that channels untrusted input to an SMTP producer without intervening header removal.

Business impact

Organizations using Apache Camel for email workflows face credential theft and message interception risks if routes accept external input without sanitization. On pre-4.19.0 deployments, SMTP credentials configured in Camel endpoints could be compromised and reused against email infrastructure. Even on patched versions, attackers can force cleartext email transmission or proxy mail through their infrastructure for espionage. The blast radius is limited to affected routes and depends entirely on architectural choices (whether untrusted data touches mail producers). Patched versions and correct mitigation reduce risk to negligible levels.

Affected systems

Apache Camel versions 4.0.0 through 4.14.7, 4.15.0 through 4.18.2, and 4.19.0 through 4.20.x are affected. The 4.14.x, 4.18.x, and 4.21.0+ branches have fixes available. Any deployment using the camel-mail component in a route that processes external input is potentially vulnerable if no header filtering is in place. This includes integrations that route HTTP requests, message queue data, or third-party API responses to SMTP producers.

Exploitability

Exploitation is straightforward for attackers if the conditions align: a route must accept untrusted input and feed it directly to an SMTP producer without header filtering. The attack is passive—no user interaction or special privileges required—but assumes the attacker can control inbound data (e.g., query string parameters, message headers, or JMS payloads). The CVSS score of 3.7 (LOW) reflects the conditional nature of exploitation (requires specific route architecture) and the limited impact on patched versions (4.19.0+). However, organizations on legacy versions face higher practical risk due to credential exposure potential. The vulnerability is not known to be exploited in the wild.

Remediation

Upgrade to Apache Camel 4.21.0 (latest), 4.18.3 (4.18.x LTS), or 4.14.8 (4.14.x LTS). After patching, the mail.smtp.* / mail.smtps.* header override is disabled by default and must be explicitly enabled via useJavaMailSessionPropertiesFromHeaders=true only on trusted endpoints. For immediate mitigation on unpatched systems, insert removeHeaders('mail.smtp.*') and removeHeaders('mail.smtps.*') filters between any untrusted data source and the mail producer. This is a defense-in-depth measure even after upgrading, recommended for routes handling external input.

Patch guidance

Apply the latest version available for your branch: 4.21.0+ (current), 4.18.3+ (if on 4.18.x), or 4.14.8+ (if on 4.14.x LTS). Verify the patch version against the official Apache Camel release notes before deployment. Test in a staging environment to confirm email workflows remain functional. After patching, audit routes to identify any that explicitly enable useJavaMailSessionPropertiesFromHeaders=true and confirm such enablement is warranted. Reapply removeHeaders filters as a secondary control on all routes accepting external input.

Detection guidance

Monitor Camel route logs and metrics for unexpected changes to SMTP connection endpoints or TLS settings. Inspect route configurations in your Camel deployment to identify any that process external input without HeaderFilterStrategy or removeHeaders filters applied before mail producers. Check endpoint definitions for useJavaMailSessionPropertiesFromHeaders settings and verify they are only enabled where documented and necessary. Review inbound data sources (HTTP endpoints, message brokers) connected to SMTP producers for misconfiguration. Network detection is limited unless the attacker redirects to an external SMTP server; log SMTP connection attempts to unexpected hosts.

Why prioritize this

This vulnerability requires specific route architecture to exploit and is rated LOW severity. However, organizations on versions before 4.19.0 face credential exposure risk, which warrants timely patching regardless of the CVSS score. Patching is straightforward and low-risk. Prioritize based on whether your routes accept external input and feed it to mail producers without filtering; if so, upgrade immediately. If your routes only process trusted internal data, the risk is negligible, but patching is still recommended as a hygiene measure.

Risk score, explained

CVSS 3.7 (LOW) is driven by three factors: (1) the attack requires specific route architecture (AC:H—high complexity), (2) on patched versions the impact is limited to TLS weakening rather than credential theft (C:L—low confidentiality impact), and (3) no authentication is required but the attacker must control inbound data. The conditional nature of exploitation—most routes may not be vulnerable—and the fact that CISA has not flagged this as exploited in the wild keep the score low. For organizations with vulnerable route patterns, practical risk is higher than the CVSS score suggests.

Frequently asked questions

Do I need to patch if my Camel routes only process internal data?

No, if your routes only accept data from trusted internal sources (e.g., internal APIs, your own databases) and never receive external input, this vulnerability does not apply to you. However, patching is still recommended as a defensive measure and for long-term hygiene, especially if route data flows may change in the future.

What's the difference in impact between versions before and after 4.19.0?

Before 4.19.0, an attacker can redirect SMTP connections to their own server and capture the credentials configured in your Camel SMTP endpoint. On 4.19.0 and later, the SMTP host is locked to the endpoint's configuration, so the attacker can only weaken TLS settings or proxy the connection through their infrastructure to intercept message content. Both are serious, but pre-4.19.0 affects confidentiality of credentials.

Is using removeHeaders filters enough without upgrading?

Yes, for unpatched systems, removeHeaders('mail.smtp.*') and removeHeaders('mail.smtps.*') placed between any untrusted data source and the mail producer will block this vulnerability. However, this requires careful route review and discipline. Upgrading is preferable because it disables the override by default, shifting the burden to opt-in rather than opt-out.

How do I check if my routes are vulnerable?

Review your Camel route configurations for any endpoints that (1) accept external input (HTTP, JMS, Kafka, etc.) and (2) send data to an SMTP/SMTPS producer without a removeHeaders filter stripping mail.smtp.* and mail.smtps.* namespaces in between. If both conditions are met and you're on an affected version, the route is vulnerable.

This analysis is based on the published CVE-2026-46584 vulnerability record and Apache Camel security advisories. The information provided is current as of the publication date but may not reflect real-time exploit activity or undisclosed attack patterns. Organizations should verify patch versions and compatibility against official Apache Camel documentation before deployment. This explainer does not constitute security advice for your specific environment; conduct your own risk assessment based on your route architecture and data flows. For official remediation details, consult the Apache Camel project security advisory. Source: NVD (public-domain), retrieved 2026-08-15. Analysis generated by SEC.co (claude-haiku-4-5).