Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Network-reachable with no auth against the default unauthenticated NATS server (AV:N/PR:N/AC:L); impact is header override affecting integrity only (I:H, C:N/A:N).
Primary rating from Vendor (apache).
CVSS VectorVendor: apache
Lifecycle Timeline
8Blast Radius
ecosystem impact- 10 maven packages depend on org.apache.camel:camel-nats (5 direct, 5 indirect)
Ecosystem-wide dependent count for version 4.0.0.
DescriptionCVE.org
Improper Input Validation vulnerability in Apache Camel NATS component.
The camel-nats component maps inbound NATS message headers into the Camel Exchange but defaulted its headerFilterStrategy to a bare new DefaultHeaderFilterStrategy() with no inbound rules configured (NatsConfiguration). With no inFilter, inFilterPattern or inFilterStartsWith set, DefaultHeaderFilterStrategy.applyFilterToExternalHeaders returns not filtered for every header name, so NatsConsumer copies every NATS message header - including Camel-internal control headers such as CamelHttpUri, CamelFileName or CamelSqlQuery - unmodified onto the Camel message. A client able to publish to the consumed NATS subject can therefore inject arbitrary Camel control headers that influence the behaviour of downstream producers in the route (for example redirecting an HTTP producer, changing a file name, or overriding a query); the injected headers also persist across internal direct, seda and vm hops. The concrete downstream impact depends on which producers the route uses. NATS message headers require NATS 2.2 or later, and the issue is reachable without credentials when the NATS server is configured without authentication (the NATS server default). 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. The fix makes camel-nats default to a dedicated NatsHeaderFilterStrategy that filters the Camel header namespace case-insensitively on inbound mapping, so client-supplied Camel* / camel* headers are no longer copied into the Exchange. For deployments that cannot upgrade immediately, strip the Camel control headers from inbound NATS messages before they reach any downstream producer (for example removeHeaders('Camel*') and removeHeaders('camel*') at the start of the route), and enable authentication on the NATS server so that only trusted clients can publish to the consumed subject.
AnalysisAI
Header injection in the Apache Camel camel-nats component (4.0.0-4.14.7, 4.15.0-4.18.2, 4.19.0-4.20.x) allows any NATS client that can publish to a consumed subject to inject arbitrary Camel-internal control headers into the Exchange because the consumer's default DefaultHeaderFilterStrategy has no inbound filter rules. An attacker can override headers such as CamelHttpUri, CamelFileName, or CamelSqlQuery to redirect HTTP producers, rename files, or alter queries in downstream route steps. No public exploit identified at time of analysis; EPSS is low (0.19%, 9th percentile) and CISA SSVC lists exploitation as none, but the flaw is remotely reachable without credentials when the NATS server runs with its default (no-auth) configuration.
Technical ContextAI
Apache Camel is a widely used Java integration framework built around Enterprise Integration Patterns, where messages traverse a 'route' of components and their headers steer producer behaviour. The camel-nats component bridges NATS (a high-throughput pub/sub messaging system whose message-header support requires NATS 2.2+) into Camel. NatsConfiguration initialized headerFilterStrategy to a bare new DefaultHeaderFilterStrategy() without setting inFilter, inFilterPattern, or inFilterStartsWith, so applyFilterToExternalHeaders returns 'not filtered' for every inbound header. NatsConsumer therefore copies all NATS message headers verbatim onto the Camel message, including the reserved Camel* control-header namespace that other components read to make routing/IO decisions. This is a textbook CWE-20 Improper Input Validation issue: externally controlled data (NATS headers) is trusted as internal control metadata. Because Camel propagates headers across in-memory direct, seda, and vm hops, the injected headers persist deep into the route. The single affected CPE is cpe:2.3:a:apache_software_foundation:apache_camel.
RemediationAI
Vendor-released patch: upgrade to Apache Camel 4.21.0 on the main stream; 4.14.x LTS users should move to 4.14.8, and 4.18.x users to 4.18.3, per https://camel.apache.org/security/CVE-2026-46457.html. The fix makes camel-nats default to a dedicated NatsHeaderFilterStrategy that filters the Camel* / camel* namespace case-insensitively on inbound mapping so client-supplied control headers are no longer copied into the Exchange. If you cannot upgrade immediately, strip Camel control headers at the very start of any NATS-consuming route with removeHeaders('Camel*') and removeHeaders('camel*') before any downstream producer runs (note this also drops any legitimately intended Camel* headers arriving on that source, so verify no route logic depends on them), and enable authentication on the NATS server so only trusted clients can publish to the consumed subject, which raises the effective privilege bar at the cost of provisioning credentials for publishers.
More in Apache Camel
View allRemote code execution in Apache Camel's camel-coap component (versions 4.14.0-4.14.5, 4.18.0 before 4.18.1, and 4.19.0)
Unsafe Java deserialization in Apache Camel's camel-infinispan component allows arbitrary code execution when the ProtoS
Header-injection in the Apache Camel camel-atmosphere-websocket producer lets an external sender hijack WebSocket messag
Header-filter bypass in the Apache Camel Undertow component (4.11.0-4.14.8, 4.15.0-4.18.3, and 4.19.0-4.21.x) lets remot
Remote code execution in Apache Camel 3.18.0-4.14.5 and 4.15.0-4.18.1 stems from CXF and Knative HeaderFilterStrategy im
Message header injection in Apache Camel's camel-mail component (3.0.0 before 4.14.6 and 4.15.0 before 4.18.1) lets an a
Remote code execution via unsafe Java deserialization affects the camel-pqc component of Apache Camel 4.18.0-4.18.2 and
Unsafe Java deserialization in Apache Camel's camel-consul component (ConsulRegistry / ConsulRegistryUtils.deserialize)
Cypher injection in Apache Camel's camel-neo4j producer allows attackers who control JSON key names in the CamelNeo4jMat
Remote code execution in the Apache Camel camel-hazelcast component allows an attacker who can join or reach the Hazelca
Remote code execution in Apache Camel's camel-vertx-http component (4.0.0-4.14.7, 4.15.0-4.18.2, 4.19.0) arises when a p
Blind out-of-band data exfiltration in Apache Camel 4.14.0-4.20.x arises because the default ObjectInputFilter pattern b
Same weakness CWE-20 – Improper Input Validation
View allSame technique Information Disclosure
View allVendor StatusVendor
Share
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-41831
GHSA-7v55-q9x3-83cj