/

CVE-2026-78164

Severity:

HIGH RISK

(8.2)

Template Injection (CWE-1336) in Apache Camel HTTP Components

CVE-2026-78164

Undergoing Analysis

Vulnerability type

Category:

Template Injection

CWE:

CWE-200, CWE-1336

Impact:

Sensitive Information Disclosure and Unauthorized Expression Evaluation

Severity:

HIGH RISK

(8.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Apache Camel HTTP producer components may evaluate attacker-influenced URI headers as property placeholders and bean expressions, exposing configuration values and sensitive data. The issue becomes risky when untrusted request headers or request-line-derived values reach affected producers without being filtered or restricted.

Apache Camel HTTP producer components may evaluate attacker-influenced URI headers as property placeholders and bean expressions, exposing configuration values and sensitive data. The issue becomes risky when untrusted request headers or request-line-derived values reach affected producers without being filtered or restricted.

Affected context

The vulnerability can occur in Apache Camel HTTP, Netty HTTP, Undertow HTTP, and Vert.x HTTP producer flows that accept CamelHttpUri or CamelRestHttpUri values from message headers. It is more likely to be exposed when HTTP consumers preserve these headers from untrusted requests, when control headers are not filtered, and when the producer resolves message-supplied URI content as configuration placeholders before making an outbound request.

The vulnerability can occur in Apache Camel HTTP, Netty HTTP, Undertow HTTP, and Vert.x HTTP producer flows that accept CamelHttpUri or CamelRestHttpUri values from message headers. It is more likely to be exposed when HTTP consumers preserve these headers from untrusted requests, when control headers are not filtered, and when the producer resolves message-supplied URI content as configuration placeholders before making an outbound request.

Exploit preconditions

  • Attack surface: Camel routes using affected HTTP producer components
  • Required access: Ability to influence inbound HTTP headers or request data that is mapped to Camel URI headers
  • Trigger point: URI construction or HTTP method processing before the outbound request
  • Why exploitation is possible: Message content is passed to configuration placeholder and bean-resolution facilities rather than being treated only as a URI value
  • Additional condition: Sensitive environment variables, system properties, registered property functions, or callable beans must be available for meaningful information disclosure or side effects
  • Attack surface: Camel routes using affected HTTP producer components
  • Required access: Ability to influence inbound HTTP headers or request data that is mapped to Camel URI headers
  • Trigger point: URI construction or HTTP method processing before the outbound request
  • Why exploitation is possible: Message content is passed to configuration placeholder and bean-resolution facilities rather than being treated only as a URI value
  • Additional condition: Sensitive environment variables, system properties, registered property functions, or callable beans must be available for meaningful information disclosure or side effects

Why this happens

The underlying bug is improper neutralization of special elements in a template or expression-processing context, mapped to CWE-1336. A message-supplied URI is processed with Camel's property-placeholder resolution mechanism, which is intended for trusted configuration rather than runtime message content. As a result, placeholder syntax and related resolution providers can access environment variables, JVM properties, registered secret functions, or eligible bean methods. This also relates to CWE-200 because values obtained during resolution may be disclosed through request processing or error messages.

The underlying bug is improper neutralization of special elements in a template or expression-processing context, mapped to CWE-1336. A message-supplied URI is processed with Camel's property-placeholder resolution mechanism, which is intended for trusted configuration rather than runtime message content. As a result, placeholder syntax and related resolution providers can access environment variables, JVM properties, registered secret functions, or eligible bean methods. This also relates to CWE-200 because values obtained during resolution may be disclosed through request processing or error messages.

Potential impact

  • An attacker may distinguish whether configuration keys or secrets exist.
  • Sensitive environment variables, system properties, or provider-backed secrets could be disclosed.
  • A route may invoke eligible no-argument bean methods with unintended effects.
  • Outbound requests could be redirected or altered through attacker-controlled URI content.
  • Error messages may expose attacker-supplied URI data and configuration-resolution details.
  • Compromised secrets could enable follow-on access to cloud, infrastructure, or application services.
  • An attacker may distinguish whether configuration keys or secrets exist.
  • Sensitive environment variables, system properties, or provider-backed secrets could be disclosed.
  • A route may invoke eligible no-argument bean methods with unintended effects.
  • Outbound requests could be redirected or altered through attacker-controlled URI content.
  • Error messages may expose attacker-supplied URI data and configuration-resolution details.
  • Compromised secrets could enable follow-on access to cloud, infrastructure, or application services.

General mitigation guidance

Mitigation generally focuses on keeping untrusted message content separate from

configuration and expression evaluation.

Common defensive patterns include:

  • Treating inbound URI and control headers as untrusted data rather than configuration templates.
  • Removing or rejecting Camel namespace control headers at the trust boundary.
  • Using strict HeaderFilterStrategy policies for consumers exposed to untrusted senders.
  • Disabling control-header processing where the component provides an appropriate opt-out.
  • Avoiding reliance on bridge settings as a security boundary unless all relevant URI-processing paths are independently constrained.
  • Resolving secrets through a dedicated vault or secret manager instead of broadly exposed environment variables or system properties.
  • Limiting registry beans, property functions, and runtime privileges according to least-privilege principles.
  • Applying supported security fixes through the organization's normal dependency-management process.

Mitigation generally focuses on keeping untrusted message content separate from

configuration and expression evaluation.

Common defensive patterns include:

  • Treating inbound URI and control headers as untrusted data rather than configuration templates.
  • Removing or rejecting Camel namespace control headers at the trust boundary.
  • Using strict HeaderFilterStrategy policies for consumers exposed to untrusted senders.
  • Disabling control-header processing where the component provides an appropriate opt-out.
  • Avoiding reliance on bridge settings as a security boundary unless all relevant URI-processing paths are independently constrained.
  • Resolving secrets through a dedicated vault or secret manager instead of broadly exposed environment variables or system properties.
  • Limiting registry beans, property functions, and runtime privileges according to least-privilege principles.
  • Applying supported security fixes through the organization's normal dependency-management process.

How teams detect issues like this

Organizations can look for this issue through:

  • Static analysis rules identifying configuration placeholder resolution applied to Exchange headers, request data, or other message-controlled values.
  • Code review checks for CamelHttpUri and CamelRestHttpUri handling, especially before HTTP producer calls.
  • Searches for routes that accept externally supplied control headers or enable unrestricted header propagation.
  • Tests that submit placeholder-like values and verify that they remain literal data and cannot access configuration or registry objects.
  • Runtime monitoring for unexpected outbound destinations, unusual secret access, and expression-resolution failures containing request-derived values.
  • Policy enforcement requiring inbound header filtering and restricting expression or bean evaluation in externally reachable routes.
  • Automated dependency and code-review tools that flag unsafe template evaluation and untrusted data flows.

Organizations can look for this issue through:

  • Static analysis rules identifying configuration placeholder resolution applied to Exchange headers, request data, or other message-controlled values.
  • Code review checks for CamelHttpUri and CamelRestHttpUri handling, especially before HTTP producer calls.
  • Searches for routes that accept externally supplied control headers or enable unrestricted header propagation.
  • Tests that submit placeholder-like values and verify that they remain literal data and cannot access configuration or registry objects.
  • Runtime monitoring for unexpected outbound destinations, unusual secret access, and expression-resolution failures containing request-derived values.
  • Policy enforcement requiring inbound header filtering and restricting expression or bean evaluation in externally reachable routes.
  • Automated dependency and code-review tools that flag unsafe template evaluation and untrusted data flows.

Sources

SourceLink
camel.apache.orgcamel.apache.org/security/CVE-2026-78164.html
github.comgithub.com/apache/camel/commit/7cec534c66969015d85e56631143174dd150ed94
github.comgithub.com/apache/camel/commit/9f8a185e315ce9e120889c4106be3dbf4688e507
github.comgithub.com/apache/camel/commit/ba5aced7f6a1c38a963020575676ad4c76b492cf
github.comgithub.com/apache/camel/pull/25571
issues.apache.orgissues.apache.org/jira/browse/CAMEL-24418

Frequently asked

questions

It may be remotely exploitable when an externally reachable Camel consumer allows

request headers or request-line-derived values to populate the affected control

headers and those values reach an HTTP producer.

Not necessarily. The required access depends on the route's exposure and header

filtering. An unauthenticated request may be sufficient when an exposed

consumer forwards attacker-controlled values.

Keep untrusted URI values out of configuration and expression-resolution

paths, filter Camel control headers at trust boundaries, and use component

options that prevent control-header processing where available.

Treat message content as data, enforce strict header policies, limit registry

and secret-provider exposure, test externally supplied headers, and use

least-privilege runtime permissions.

It may be remotely exploitable when an externally reachable Camel consumer allows

request headers or request-line-derived values to populate the affected control

headers and those values reach an HTTP producer.

Not necessarily. The required access depends on the route's exposure and header

filtering. An unauthenticated request may be sufficient when an exposed

consumer forwards attacker-controlled values.

Keep untrusted URI values out of configuration and expression-resolution

paths, filter Camel control headers at trust boundaries, and use component

options that prevent control-header processing where available.

Treat message content as data, enforce strict header policies, limit registry

and secret-provider exposure, test externally supplied headers, and use

least-privilege runtime permissions.

Find out what's already
exploitable in your codebase.