The fix for CVE-2025-27636 added setLowerCase(true) to HttpHeaderFilterStrategy so that case-variant header names such as 'CAmelExecCommandExecutable' are filtered out alongside 'CamelExecCommandExecutable'. The same setLowerCase(true) call was not applied to five non-HTTP HeaderFilterStrategy implementations: JmsHeaderFilterStrategy and ClassicJmsHeaderFilterStrategy in camel-jms, SjmsHeaderFilterStrategy in camel-sjms, CoAPHeaderFilterStrategy in camel-coap, and GooglePubsubHeaderFilterStrategy in camel-google-pubsub. Because those strategies use case-sensitive String.startsWith('Camel'/'camel') filtering while the Camel Exchange stores headers in a case-insensitive map, an attacker with JMS (or equivalent) producer access to the broker consumed by a Camel route can inject case-variant Camel internal headers, which are then resolved by downstream components such as camel-exec and camel-file using their canonical casing. This enables remote code execution and arbitrary file write on routes that forward JMS messages to header-driven components. This issue affects Apache Camel: from 3.0.0 before 4.14.6, from 4.15.0 before 4.18.2, from 4.19.0 before 4.20.0. Users are recommended to upgrade to version 4.20.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.6. If users are on the 4.18.x releases stream, then they are suggested to upgrade to 4.18.2.
The patch for CVE-2025-27636 added the setLowerCase(true) flag only to HttpHeaderFilterStrategy, omitting five other implementations: JmsHeaderFilterStrategy, ClassicJmsHeaderFilterStrategy (camel-jms), SjmsHeaderFilterStrategy (camel-sjms), CoAPHeaderFilterStrategy (camel-coap), and GooglePubsubHeaderFilterStrategy (camel-google-pubsub). These strategies filter headers using case-sensitive String.startsWith('Camel'/'camel') method, while the Camel Exchange header map is case-insensitive. An attacker with producer access to a JMS broker (or equivalent) can send a header with a case variant, such as 'CAmelExecCommandExecutable', which will not be filtered. Such a header is then recognized by downstream components (e.g., camel-exec, camel-file) by their canonical name, leading to unauthorized command execution or file writes.
An attacker with producer access to a JMS broker can execute arbitrary code on the server (RCE) and write arbitrary files to the file system, which in practice means complete takeover of the machine hosting the Camel route.
Apache Camel should be updated to version 4.20.0. Users of the LTS 4.14.x branch should upgrade to version 4.14.6, and users of the 4.18.x branch to version 4.18.2. Additionally, it is recommended to restrict producer access to JMS brokers only to trusted clients.
Apache Camel in versions from 3.0.0 before 4.14.6, from 4.15.0 before 4.18.2, and from 4.19.0 before 4.20.0; affects camel-jms, camel-sjms, camel-coap, and camel-google-pubsub components
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:HApache Camel
APPApache4.19.03.0.0 – 4.14.6 (bez)4.15.0 – 4.18.2 (bez)
Related vulnerabilities
Apache Camel: wstrzyknięcie nagłówków HTTP w camel-cxf i camel-knative (RCE)
Apache Camel: niebezpieczna deserializacja JMS ObjectMessage prowadząca do RCE
Apache Camel: wstrzyknięcie nagłówków przez komponent Camel-Mail
Apache Camel camel-coap: RCE poprzez wstrzyknięcie nagłówków Camel
Apache Camel: pominięcie weryfikacji issuer JWT w KeycloakSecurityPolicy