---
id: "CVE-2026-85314"
kind: "vulnerability"
aliases: ["CVE-2026-85314"]
title: "Apache Camel mail: crafted multipart messages can set mail.smtp headers"
severity: "medium"
cvss: 6.5
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["apache-camel", "camel-mail", "java", "package"]
not_affected_if: ["no-camel-mail", "no-mimemultipart-unmarshal"]
published_at: "2026-10-19T11:17:24+00:00"
first_seen_at: "2026-10-23T21:57:18+00:00"
updated_at: "2026-10-25T03:57:08+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-85314", "first_seen_at": "2026-10-23T21:57:18+00:00"}]
---

# Apache Camel mail: crafted multipart messages can set mail.smtp headers

The MimeMultipart data format in the Apache Camel mail component copies mail.smtp headers from an incoming multipart message onto the Exchange without filtering them. A message from an external sender can therefore influence how a downstream mail producer connects and sends.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the Apache Camel version in the project build file (for example `mvn dependency:tree | grep camel-mail`) and see whether it is below `4.18.5` on the 4.18 line or below `4.22.1` on the 4.22 line
- Look for routes that unmarshal with MimeMultipart and feed a mail producer downstream
- Check whether the route applies removeHeaders("mail.smtp*") before the producer

## Fix

- Upgrade Apache Camel to `4.23.0`
- On the 4.18 LTS stream, upgrade to `4.18.5`
- On the 4.22 LTS stream, upgrade to `4.22.1`
- If upgrading is not possible now, add removeHeaders("mail.smtp*") after the MimeMultipart data format and before any mail producer

## Timeline

- 2026-10-23T21:57:18+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-85314

## From the sources

Improper Input Validation vulnerability in Apache Camel Mail component.

This issue affects Apache Camel: from 4.0.0 before 4.18.5, from 4.19.0 before 4.22.1.

CVE-2026-46584 addressed mail headers reaching the Exchange without passing through a header filter, but the MimeMultipart data format retained an unfiltered path: unmarshalling a multipart message mapped mail.smtp headers onto the Exchange with no filter applied. Those names sit outside the Camel namespace that consumer filters block, so a message crafted by an external sender could still set them, and the mail.smtp namespace influences how a downstream mail producer connects and sends. This is an incomplete fix of CVE-2026-46584 rather than a new class of defect: a deployment that applied that advisory and considered camel-mail settled remained exposed on this path.

Upgrade to Apache Camel 4.23.0, which fixes the issue. Users on the 4.18.x LTS releases stream should upgrade to 4.18.5. Users on the 4.22.x LTS releases stream should upgrade to 4.22.1. The MimeMultipart data format now applies the header filter on unmarshal, closing the path CVE-2026-46584 left open. For deployments that cannot upgrade immediately, strip the namespace after the data format with removeHeaders("mail.smtp*") before any mail producer.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
