← Security advisories
Apache Camel security advisory

CVE-2026-85251

Camel-HTTP: credential disclosure - with followRedirects enabled the Authorization header was re-attached to whatever host the Location header named, so the remote server chose which host received the credentials

Description

Two paths handed credentials to a redirect target, which is a host chosen by the remote server rather than by the route, once followRedirects=true. OAuth2ClientConfigurer registers its interceptor with addRequestInterceptorFirst, and HttpClient runs protocol-level request interceptors inside ProtocolExec, which sits below RedirectExec in the exec chain; the interceptor therefore ran again for every redirect hop and re-attached Authorization: Bearer <token> to whatever host the Location header named. Separately, credentials were registered against an AuthScope matching any host, so basic and digest credentials were presented to a redirect target as well. A remote endpoint - or anyone who can influence its responses - could therefore collect the bearer token or the configured credentials simply by answering with a redirect to a host it controls.

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. Credentials are now sent only to the authority the endpoint was configured with, and are not re-attached when a redirect crosses to another host. For deployments that cannot upgrade immediately, set followRedirects=false on endpoints that carry credentials, and handle any redirect explicitly in the route so that the destination is chosen by the route rather than by the remote server.

Credit

This issue was discovered by Claude Security Scan Tool

Notes

The JIRA ticket: https://issues.apache.org/jira/browse/CAMEL-24452 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/25830 (commit 3a6c27bfae04e528f5a76494db6d6d97b9234551), backported to camel-4.22.x in https://github.com/apache/camel/pull/25937 (commit b0399b181d26cd8b136fa98b54ec8e5c283338da) and to camel-4.18.x in https://github.com/apache/camel/pull/25938 (commit e23332aec12f7ec3a841e52d1821e2a580c2fbc7).

The issue is classified as CWE-200 Exposure of Sensitive Information to an Unauthorized Actor. 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