← Security advisories
Apache Camel security advisory

CVE-2026-84178

Camel-OAuth: login cross-site request forgery - the authorization code callback was not bound to the flow that started it, so a code obtained in any browser could be redeemed at the callback and bound to whichever session presented it

Description

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.

Mitigation

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.

Credit

This issue was discovered by Claude Security Scan Tool

Notes

The JIRA ticket: https://issues.apache.org/jira/browse/CAMEL-24437 refers to the various commits that resolved the issue, and has more details.

The fix was merged on main in https://github.com/apache/camel/pull/25821 (commit 495c5ad39a0f95f823da512b38da5c19609e2a1c), backported to camel-4.22.x in https://github.com/apache/camel/pull/25944 (commit 95b4c1500001bc32877df5b8fca0bc7bdd080666) and to camel-4.18.x in https://github.com/apache/camel/pull/25946 (commit 4ec9b37d70b08c478966000fb1bd653abfe410e3).

The issue is classified as CWE-352 Cross-Site Request Forgery (CSRF). The camel-4.14.x line reached end of life before this fix and does not receive it; deployments on 4.14.x should move to 4.18.5 or later.

References