Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-78164 Overview
CVE-2026-78164 is an information disclosure and template injection vulnerability affecting Apache Camel HTTP producer components. The flaw lets an inbound message override endpoint URIs through the CamelHttpUri and CamelRestHttpUri headers. Camel then passes that attacker-controlled string through CamelContext.resolvePropertyPlaceholders() before using it. Property-placeholder resolution reaches operating-system environment variables, JVM system properties, every PropertiesFunction registered on the classpath including secret functions, and no-argument method invocation on registry beans. A static route such as to("http://backend/api") is sufficient to inherit the exposure.
Critical Impact
Unauthenticated remote attackers can exfiltrate environment variables, system properties, and vault secrets by injecting ${...} placeholders into HTTP headers reaching a vulnerable Camel producer.
Affected Products
- Apache Camel versions 4.0.0 through 4.18.4 (camel-http, camel-http-common)
- Apache Camel versions 4.19.0 through 4.22.0 (camel-netty-http, camel-undertow)
- Apache Camel camel-vertx-http component across the same ranges
Discovery Timeline
- 2026-10-19 - CVE-2026-78164 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-78164
Vulnerability Analysis
The root issue is that Camel treats message-supplied URI content as a configuration-resolution context. Seven call sites invoke resolvePropertyPlaceholders() on header values: HttpHelper.createURL and HttpHelper.createMethod in camel-http-common, HttpMethodHelper.createMethod in camel-http, VertxHttpHelper.resolveHttpURI in camel-vertx-http, UndertowHelper.createURL and UndertowHelper.createMethod in camel-undertow, and NettyHttpHelper.createURL in camel-netty-http. Each site exposes environment variables, JVM system properties, classpath-registered PropertiesFunction implementations, and bean method invocations through camel-bean.
The bridgeEndpoint option does not contain the exposure. It suppresses the CamelHttpUri override in the createURL family but not in the createMethod family, so bridged routes still resolve placeholders taken from the header. CamelRestHttpUri is consumed before any bridgeEndpoint check in all four components. Only camel-http offers skipControlHeaders, which defaults to false [CWE-200].
Root Cause
Property-placeholder resolution is a configuration-resolution facility, not a URI-parsing step. Applying it to Exchange content turns a URI string into a bean-evaluation and secret-resolution context. The behaviour predates the 4.x line. CAMEL-24282 aligned the dynamic-URI EIPs toD and enrich to a build-time-resolution contract in 4.22.0, but the HTTP producer components were not covered until this fix.
Attack Vector
Several Camel HTTP consumers populate CamelHttpUri from the request line as a documented reverse-proxy feature, so direct header injection is not always required. An unresolvable placeholder additionally produces a RuntimeExchangeException whose message echoes the URI. This distinguishes a set from an unset configuration key even where no outbound request is made, enabling blind secret enumeration.
// Patch from CAMEL-24418 removes RuntimeExchangeException import
// in HttpHelper and HttpMethodHelper after dropping placeholder
// resolution on header-supplied URIs:
import org.apache.camel.CamelContext;
import org.apache.camel.Exchange;
-import org.apache.camel.RuntimeExchangeException;
import org.apache.camel.converter.stream.CachedOutputStream;
import org.apache.camel.support.CamelObjectInputStream;
import org.apache.camel.support.http.HttpUtil;
Source: Apache Camel Commit 7cec534
Detection Methods for CVE-2026-78164
Indicators of Compromise
- Inbound HTTP requests containing ${...} placeholder syntax in CamelHttpUri or CamelRestHttpUri headers, or in request paths proxied to Camel consumers.
- RuntimeExchangeException entries in Camel logs that echo URI strings containing environment variable names, sys:, env:, or vault: prefixes.
- Outbound HTTP requests from a Camel producer where the resolved URL contains values matching known secrets, hostnames, or JVM system property values.
Detection Strategies
- Inspect Camel routes using the camel-http, camel-netty-http, camel-undertow, or camel-vertx-http components and verify whether inbound consumers apply a HeaderFilterStrategy over the Camel* namespace.
- Audit application logs for resolvePropertyPlaceholders invocations originating from header values; correlate with upstream request metadata.
- Review deployed Camel versions against the fixed releases 4.18.5, 4.22.1, and 4.23.0.
Monitoring Recommendations
- Alert on HTTP request headers or paths containing the ${ and } delimiters routed to Java services running Camel.
- Monitor outbound DNS and HTTP egress from Camel JVMs for destinations encoding environment variable content or vault keys.
- Capture and retain RuntimeExchangeException stack traces for forensic review of attempted placeholder enumeration.
How to Mitigate CVE-2026-78164
Immediate Actions Required
- Upgrade to Apache Camel 4.23.0, or apply the stream-aligned fixes 4.22.1 or 4.18.5.
- Migrate deployments on the 4.14.x line or earlier to a supported release, since those lines reached end of life before the fix.
- Strip override headers at the trust boundary using removeHeader("CamelHttpUri") and removeHeader("CamelRestHttpUri") before any HTTP producer.
- Resolve secrets through a vault accessed outside the placeholder namespace, not through environment variables or JVM system properties.
Patch Information
The fix is tracked under Apache Camel JIRA Issue CAMEL-24418 and merged through Apache Camel Pull Request #25571. The relevant commits are 7cec534, 9f8a185, and ba5aced. Full details are in the Apache Camel CVE-2026-78164 Advisory.
Workarounds
- Set skipControlHeaders=true on camel-http endpoints; note this option is not available on the other three affected components.
- Apply a strict inbound HeaderFilterStrategy over the Camel namespace on consumers exposed to untrusted senders as defence in depth.
- Do not rely on bridgeEndpoint=true; it suppresses the header override when building the outbound URL but not when the header is re-parsed for the query string.
- Do not rely on percent-encoding of ${ and } delimiters for camel-netty-http, because its binding decodes the request path before the value reaches the header.
# Remove override headers at the route trust boundary
from("jetty:http://0.0.0.0:8080/ingress")
.removeHeader("CamelHttpUri")
.removeHeader("CamelRestHttpUri")
.to("http://backend/api?skipControlHeaders=true");
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

