CVE-2026-83531: CWE-94 Improper Control of Generation of Code ('Code Injection') in Apache Software Foundation Apache Camel
Description
Improper Control of Generation of Code ('Code Injection'), Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection') vulnerability in Apache Camel. This issue affects Apache Camel: from 4.4.0 before 4.18.5, from 4.19.0 before 4.22.1. The dynamic-router-control endpoint, introduced in 4.4.0, lets routing participants manage Dynamic Router subscriptions by sending control messages. When it handled a subscribe or update request, DynamicRouterControlProducer took the subscription predicate and the name of the language used to compile it from the incoming message, either from the predicate and expressionLanguage fields of a DynamicRouterControlMessage body or from the CamelDynamicRouterPredicate and CamelDynamicRouterExpressionLanguage headers. DynamicRouterControlService then resolved that language from the CamelContext and compiled the expression into a Predicate, with no allow-list and no opt-in. The compiled predicate was added to the channel's rule base and evaluated against every exchange routed through the corresponding dynamic-router endpoint for as long as the subscription existed. A route that forwards messages from an external transport to the control endpoint, as shown in the component documentation for routing participants in other JVMs or applications, therefore let any actor able to send a message on that transport supply an expression of their choosing, which was evaluated with the privileges of the Camel process. Any expression language available on the classpath could be selected, including the simple language, which is always present and was the default on the header path, so removing optional expression languages from the classpath did not prevent the issue. Exploitation requires the ability to send a message on a transport whose route forwards it to a dynamic-router-control endpoint; no other authentication or user interaction is needed. Releases before 4.4.0 are not affected, because their control channel took predicate expressions only from the endpoint URI configured by the route author. Users are recommended to upgrade to version 4.23.0, which fixes the issue. If users are on the 4.22.x releases stream, then they are suggested to upgrade to 4.22.1. If users are on the 4.18.x releases stream, then they are suggested to upgrade to 4.18.5. The 4.14.x releases stream and earlier reached end of life before this issue was resolved and will not receive a fix, so deployments on those lines must move to a supported release. After upgrading, a control message that carries a predicate expression or an expression language is rejected unless the new allowPredicateFromMessage option is enabled on the dynamic-router-control endpoint; enable it only when every sender of control messages is trusted. For deployments that cannot upgrade immediately, do not forward messages from untrusted or shared transports to a dynamic-router-control endpoint. Where control messages must cross such a transport, authenticate the sender and make sure the predicate and expression language of each subscription are set by the route rather than taken from the incoming message, for example by removing the CamelDynamicRouterPredicate and CamelDynamicRouterExpressionLanguage headers and clearing the predicate and expressionLanguage fields of a DynamicRouterControlMessage before it reaches the endpoint. Removing optional expression languages from the classpath is not a sufficient workaround. As defence in depth, restrict who can send to the transports that feed the control endpoint, and on 4.23.0 and 4.22.1 set the allowedSchemes option of the dynamic-router endpoint to limit which endpoints a subscription's destinationUri may name.
CVSS v3.1
Score 8.8high
Affected software
Apache Software Foundation
Apache Camel
pkg:maven/Apache Software Foundation/org.apache.camel:camel-dynamic-routerRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Apache Camel's dynamic-router-control endpoint introduced in version 4.4.0 allows routing participants to manage Dynamic Router subscriptions by sending control messages containing predicate expressions and expression language names. These expressions are compiled and evaluated with the privileges of the Camel process without any allow-list or opt-in, enabling code injection. Any actor able to send a message on a transport route forwarding to this endpoint can supply arbitrary expressions, including the default simple language, leading to potential remote code execution. Versions affected are >=4.4.0 <4.18.5 and >=4.19.0 <4.22.1. The vulnerability is resolved in versions 4.18.5, 4.22.1, and 4.23.0 by rejecting control messages carrying predicate expressions unless explicitly enabled via the allowPredicateFromMessage option. Additional mitigations include restricting message senders and sanitizing incoming control messages.
Potential Impact
Successful exploitation allows an attacker with the ability to send messages to the dynamic-router-control endpoint to execute arbitrary code with the privileges of the Apache Camel process. This can lead to full compromise of the affected system, including confidentiality, integrity, and availability impacts as indicated by the CVSS score of 8.8 (high severity). No user interaction or additional authentication is required beyond the ability to send messages on the relevant transport.
Mitigation Recommendations
A fix is available in Apache Camel versions 4.18.5, 4.22.1, and 4.23.0. Users should upgrade to one of these versions to remediate the vulnerability. After upgrading, control messages containing predicate expressions or expression languages are rejected unless the allowPredicateFromMessage option is explicitly enabled; enable this option only if all message senders are trusted. For deployments unable to upgrade immediately, do not forward messages from untrusted or shared transports to the dynamic-router-control endpoint. Authenticate senders and sanitize incoming control messages by removing the CamelDynamicRouterPredicate and CamelDynamicRouterExpressionLanguage headers and clearing predicate and expressionLanguage fields before reaching the endpoint. Removing optional expression languages from the classpath is insufficient as a mitigation. Additionally, restrict who can send messages to the transports feeding the control endpoint and configure the allowedSchemes option on versions 4.23.0 and 4.22.1 to limit subscription destination URIs.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- apache
- Date Reserved
- 2026-08-31T16:32:43.348Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6ad5f5a22cdf04f65643556c
Added to database: 10/19/2026, 10:49:06 UTC
Last enriched: 10/19/2026, 11:03:15 UTC
Last updated: 10/20/2026, 04:18:59 UTC
Views: 10
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.