CVE-2026-84178: Apache Camel: Camel-OAuth Login Cross-Site Request Forgery via Missing State Binding in the Authorization Code Flow
Cross-Site Request Forgery (CSRF) vulnerability in Apache Camel OAuth component.
This issue affects Apache Camel: from 4.11.0 before 4.18.5, from 4.19.0 before 4.22.1.
The authorization code callback did not carry a state parameter binding it to the authorization request that started the flow, and the callback did not verify one. An authorization code obtained in any browser could therefore be redeemed at the callback and associated with whichever session presented it, which is login cross-site request forgery: a victim can be silently signed in as an identity the attacker controls, so that actions the victim then performs, and data they then submit, land in the attacker's account. The same unvalidated callback handling also allowed the post-authentication redirect target to be influenced, giving an open redirect from a trusted origin. The state check runs before the authorization code is redeemed, so these paths are reachable without any interaction with the identity provider.
Upgrade to Apache Camel 4.23.0, which fixes the issue. Users on the 4.18.x LTS releases stream should upgrade to 4.18.5. Users on the 4.22.x LTS releases stream should upgrade to 4.22.1. The authorization request now issues a state value bound to the session, and the callback rejects a request whose state is absent or does not match, stopping the route with a 400 response. For deployments that cannot upgrade immediately, terminate the authorization code flow in a component that performs its own state binding rather than relying on the Camel callback. Note that after upgrading, a deployment behind a proxy that drops or rewrites the callback query string will begin to see 400 responses, because the state parameter must survive the round trip.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Apache Camelto a version that resolves this vulnerability.Fixed in 4.23.0 - Upgrade
Upgrade
Apache Camelto a version that resolves this vulnerability.Fixed in 4.18.5 - Upgrade
Upgrade
Apache Camelto a version that resolves this vulnerability.Fixed in 4.22.1 - Compensating control
For deployments that cannot upgrade immediately, terminate the authorization code flow in a component that performs its own state binding rather than relying on the Camel callback.
- Compensating control
Ensure any proxy in front of the deployment preserves the callback query string, including the state parameter, without dropping or rewriting it.
Event History
Frequently Asked Questions
Which Apache Camel releases need to be upgraded?
Affected versions are Apache Camel 4.11.0 through versions before 4.18.5, and 4.19.0 through versions before 4.22.1. Upgrade to 4.18.5 on the 4.18.x LTS stream, 4.22.1 on the 4.22.x LTS stream, or 4.23.0.
What does an attacker need to exploit the login CSRF behavior?
An attacker needs an authorization code obtained in any browser and must cause that code to be presented to the affected authorization-code callback in a victim's session. The vulnerable callback can redeem the code without validating that it belongs to the authorization request that initiated the victim's flow.
Does exploitation require the identity provider to participate in the victim's request?
No. The state validation occurs before authorization-code redemption, and the affected callback paths are reachable without interaction with the identity provider.
What is the practical consequence for a victim who reaches the malicious callback?
The victim can be silently signed in as an account controlled by the attacker. Actions performed and data submitted by the victim may then be associated with the attacker's account; the callback can also be used as an open redirect from a trusted origin.