CVE-2026-49098: Apache Camel: Camel-Kafka: The kafka.OVERRIDE_TOPIC (and other kafka.*) Exchange header constants used non-Camel-prefixed names that bypass the upstream HTTP header filter, allowing an HTTP client to redirect Kafka messages to an arbitrary topic

Published Jul 5, 2026
·
Updated

Improper Input Validation, Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') vulnerability in Apache Camel Kafka Component.

The camel-kafka producer can override its configured target topic at runtime from the kafka.OVERRIDETOPIC Exchange header: KafkaProducer.evaluateTopic() returns the header value in preference to the topic configured on the endpoint. The control-header constants in KafkaConstants (for example OVERRIDETOPIC = kafka.OVERRIDETOPIC, OVERRIDETIMESTAMP = kafka.OVERRIDETIMESTAMP, PARTITIONKEY = kafka.PARTITIONKEY) used plain, non-Camel-prefixed values. camel-kafka's own KafkaHeaderFilterStrategy does filter the kafka. namespace, but only on the Kafka-to-Exchange serialization boundary (reading Kafka record headers into the Exchange, and writing Exchange headers into a Kafka record); it does not apply to headers that arrive from an upstream consumer in a multi-component route. The upstream HTTP consumer uses HttpHeaderFilterStrategy, which blocks only the Camel / camel namespace, so a kafka. header passes through unfiltered. As a result, in a route that bridges an HTTP consumer (for example platform-http) into a kafka: producer, any HTTP client could set the kafka.OVERRIDETOPIC header and cause the message to be published to an arbitrary Kafka topic instead of the configured one - redirecting it to a sensitive internal topic, or injecting attacker-crafted messages into a topic consumed by a critical downstream service. The related kafka.OVERRIDETIMESTAMP and kafka.PARTITIONKEY headers could likewise be injected to backdate messages or target specific partitions. No credentials are required when the bridging consumer is unauthenticated. 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, routes that set or read Kafka headers via the raw header names must use the CamelKafka names (for example CamelKafkaOverrideTopic and CamelKafkaTopic) instead of the old kafka. values. For deployments that cannot upgrade immediately, strip the kafka. headers from any untrusted ingress before the kafka: producer (for example removeHeaders('kafka.') at the start of the route), and set the target topic from a trusted source.

Affected Software

4 affected components
Apache Camel Camel-Kafka component>4.0.0<=4.14.8, >4.15.0<=4.18.3, >4.19.0<=4.21.0
Apache Camel>=4.0.0<4.14.8
Apache Camel>=4.15.0<4.18.3
Apache Camel>=4.19.0<4.21.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Apache Camel (camel-kafka) to a version that resolves this vulnerability.

    Fixed in 4.14.8
  2. Upgrade

    Upgrade Apache Camel (camel-kafka) to a version that resolves this vulnerability.

    Fixed in 4.18.3
  3. Upgrade

    Upgrade Apache Camel (camel-kafka) to a version that resolves this vulnerability.

    Fixed in 4.21.0
  4. Configuration

    For deployments that cannot upgrade immediately, strip any kafka.* headers from untrusted ingress before the kafka: producer (e.g., call removeHeaders('kafka.*') at the start of the route), and set the target topic only from a trusted source.

    Apache Camel routes bridging HTTP consumer to kafka: producer (camel-kafka) removeHeaders('kafka.*') at start of route = removeHeaders('kafka.*')
  5. Configuration

    After upgrading, routes that set or read Kafka headers via the raw header names must use CamelKafka* names (for example CamelKafkaOverrideTopic and CamelKafkaTopic) instead of the old kafka.* values, so the upstream HTTP header filter does not get bypassed.

    Apache Camel routes using camel-kafka Exchange header constants Kafka topic override header constant names = Use CamelKafka* names (e.g., CamelKafkaOverrideTopic and CamelKafkaTopic) instead of kafka.* (e.g., kafka.OVERRIDE_TOPIC)
  6. Compensating control

    Ensure the bridging HTTP consumer is authenticated (this issue can be exploited when the bridging consumer is unauthenticated).

Event History

Jul 6, 2026
CVE Published
via MITRE·08:10 AM
Data Sourced
via MITRE·08:10 AM
DescriptionWeakness
Data Sourced
via NVD·09:16 AM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-49098?

The severity of CVE-2026-49098 is rated as medium with a score of 5.3 according to CVSS 3.1.

2

What issue does CVE-2026-49098 present in Apache Camel?

CVE-2026-49098 presents an improper input validation vulnerability that allows HTTP clients to redirect Kafka messages to arbitrary topics.

3

How do I fix CVE-2026-49098?

To fix CVE-2026-49098, ensure that the kafka.OVERRIDE_TOPIC header and other kafka.* header constants are properly validated before use.

4

Which component is affected by CVE-2026-49098?

CVE-2026-49098 affects the Apache Camel Kafka component, specifically the camel-kafka producer.

5

What type of vulnerability is CVE-2026-49098 classified as?

CVE-2026-49098 is classified as an input validation vulnerability due to improper neutralization of special elements.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203