You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andrea Cosentino (Jira)" <ji...@apache.org> on 2026/09/29 07:10:00 UTC

[jira] [Resolved] (CAMEL-24998) camel-hivemq: consumer is missing a HeaderFilterStrategy, allowing Camel-internal headers to be injected from the MQTT message

     [ https://issues.apache.org/jira/browse/CAMEL-24998?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrea Cosentino resolved CAMEL-24998.
--------------------------------------
    Resolution: Not A Problem

Resolved as Not A Problem: HiveMQConsumer.onMessage() only sets three fixed-name headers (CamelHiveMQTopic, CamelHiveMQQos, CamelHiveMQRetained) from MQTT publish metadata and does not map MQTT5 user properties or any sender-chosen header name, so a publisher cannot inject Camel* headers. Applying the default HeaderFilterStrategy filtered the component's own headers instead. PR closed: https://github.com/apache/camel/pull/26890#issuecomment-5874369812

> camel-hivemq: consumer is missing a HeaderFilterStrategy, allowing Camel-internal headers to be injected from the MQTT message
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-24998
>                 URL: https://issues.apache.org/jira/browse/CAMEL-24998
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Andrea Cosentino
>            Assignee: Andrea Cosentino
>            Priority: Major
>
> HiveMQConsumer.onMessage() maps the inbound MQTT publish topic name and flags to CamelHiveMQ* Exchange headers without applying a HeaderFilterStrategy. There is no filter anywhere in the component. This means:
> 1. An attacker who can publish to a subscribed MQTT topic can inject arbitrary Camel* headers that survive onto the Exchange, bypassing the DefaultHeaderFilterStrategy that other consumers apply to block the internal-dispatch namespace (the CVE-2025-27636 class).
> 2. If the Exchange flows to a camel-hivemq producer (e.g. as a bridge), the CamelHiveMQOverrideTopic header - if injected - would drive where the message is republished.
> The fix is to add a headerFilterStrategy field to HiveMQEndpoint (defaulting to DefaultHeaderFilterStrategy) and apply it when populating Exchange headers in HiveMQConsumer, following the pattern used by components fixed in the CVE-2025-27636 family.
> Affected files:
> - components/camel-hivemq/src/main/java/org/apache/camel/component/hivemq/HiveMQConsumer.java
> - components/camel-hivemq/src/main/java/org/apache/camel/component/hivemq/HiveMQEndpoint.java



--
This message was sent by Atlassian Jira
(v8.20.10#820010)