Description
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.
Published: 2026-07-06
Score: 3.7 Low
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Apache Camel Mail allows an attacker to inject headers prefixed with mail.smtp. or mail.smtps. into outgoing exchanges. These headers are interpreted by the MailProducer and are applied as JavaMail session properties on a per‑message basis. In releases prior to 4.19.0 an attacker can set mail.smtp.host to point to a malicious server, causing the producer to send the endpoint’s configured username and password to that server, resulting in credential disclosure. For versions 4.19.0 and later the host parameter is bound to the endpoint’s configured host, but the attacker can still weaken transport security by manipulating properties such as mail.smtp.ssl.trust, mail.smtp.starttls.enable, or mail.smtp.socks.host, and can intercept the message content. The flaw is rooted in improper input validation (CWE‑20), exposure of sensitive information (CWE‑200), and the ability to coerce the component to connect to arbitrary hosts (CWE‑918), which effectively gives the attacker a server‑side request forgery vector for internal or external services.

Affected Systems

The flaw affects the Apache Camel Mail component distributed by the Apache Software Foundation. Vulnerable releases are 4.0.0 through 4.14.7, 4.15.0 through 4.18.2, and 4.19.0 through 4.20.9. Any deployment that uses Camel routes to produce email via SMTP or SMTPS and does not remove the mail.* namespace from untrusted input is at risk.

Risk and Exploitability

The CVSS base score of 3.7 classifies the vulnerability as low severity, and the EPSS score of less than 1 % indicates a low likelihood of exploitation. KEV does not list this flaw, suggesting limited known exploitation. Attacks require that untrusted data reach the mail producer without header removal, which can occur through HTTP query parameters, JMS, or Kafka messages. In pre‑4.19.0 releases this can lead to credential theft; in later releases the impact is limited to transport security weakening and potential message interception. Additionally, the ability to override the host property provides an SSRF vector, allowing an attacker to reach arbitrary hosts from within the environment. The overall risk is moderate, driven by the confidentiality compromise that could arise from host redirection, but exploitation remains unlikely under current conditions.

Generated by OpenCVE AI on July 23, 2026 at 15:15 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Apache Camel Mail to 4.21.0; if using the 4.14.x LTS release upgrade to 4.14.8, or if using the 4.18.x release upgrade to 4.18.3, which disables per‑message header override by default.
  • Insert removeHeaders('mail.smtp.*') and remove any SMTP/SMTPS producer in routes that handle untrusted input.
  • If you elect to enable useJavaMailSessionPropertiesFromHeaders=true, restrict its use to routes that do not accept external data and ensure the mail.* headers are stripped on any untrusted path.

Generated by OpenCVE AI on July 23, 2026 at 15:15 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 08 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-918
References
Metrics threat_severity

None

threat_severity

Moderate


Mon, 06 Jul 2026 23:15:00 +0000

Type Values Removed Values Added
First Time appeared Apache
Apache camel Mail
Vendors & Products Apache
Apache camel Mail

Mon, 06 Jul 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 3.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 06 Jul 2026 09:00:00 +0000

Type Values Removed Values Added
Description 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.
Title Apache Camel Mail: The mail producer applied attacker-supplied message headers as JavaMail session properties, allowing an attacker to influence SMTP parameters
Weaknesses CWE-20
CWE-200
References

Subscriptions

Apache Camel Mail
cve-icon MITRE

Status: PUBLISHED

Assigner: apache

Published:

Updated: 2026-07-06T19:26:03.975Z

Reserved: 2026-05-15T07:52:46.176Z

Link: CVE-2026-46584

cve-icon Vulnrichment

Updated: 2026-07-06T09:25:18.675Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-06T08:02:37Z

Links: CVE-2026-46584 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-23T15:30:04Z

Weaknesses
  • CWE-20

    Improper Input Validation

  • CWE-200

    Exposure of Sensitive Information to an Unauthorized Actor

  • CWE-918

    Server-Side Request Forgery (SSRF)