Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-85317 Overview
CVE-2026-85317 is a Use of Cache Containing Sensitive Information vulnerability [CWE-524] in the Apache Camel HTTP component. The flaw affects Apache Camel versions 4.0.0 through 4.18.4 and 4.19.0 through 4.22.0. The OAuth2 client token cache is global to the Java Virtual Machine (JVM), and its cache key omits the requested scope, resource indicator, and token endpoint. Two Camel endpoints that differ only in those fields share a cache entry. As a result, an endpoint can be served an OAuth2 access token minted for a different scope, resource, or authorization server.
Critical Impact
An Apache Camel route may present an OAuth2 token to a party it was not issued for, or carry broader authority than the endpoint was configured to request.
Affected Products
- Apache Camel 4.0.0 through 4.18.4
- Apache Camel 4.19.0 through 4.22.0
- Apache Camel HTTP component with OAuth2 client credentials configuration
Discovery Timeline
- 2026-10-19 - CVE-2026-85317 published to the National Vulnerability Database (NVD)
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-85317
Vulnerability Analysis
The Apache Camel HTTP component supports OAuth2 client credentials for outbound requests. To avoid requesting a new access token on every exchange, the component caches tokens in a JVM-wide cache. The cache key did not include every field that determines what a token actually authorises. Specifically, the requested scope, the resource indicator, and the tokenEndpoint URL were omitted from the key.
When two Camel endpoints differed only in those fields, they resolved to the same cache entry. The first endpoint to populate the cache seeded a token that the second endpoint would then reuse. The second endpoint received a bearer token minted for a different scope, a different protected resource, or by a different authorization server. The downstream service received a token it should not have accepted, or the request carried privileges the route was not configured to request.
Root Cause
The root cause is an incomplete cache key in the OAuth2 token cache used by the Camel HTTP component. Token identity is determined by the client identifier together with the scope, resource indicator, and token endpoint. Omitting the last three fields from the key violates the OAuth2 token binding model and allows cross-endpoint token reuse within a single JVM.
Attack Vector
Exploitation requires a deployment that configures more than one OAuth2-enabled Camel HTTP endpoint in the same JVM, where those endpoints differ only in scope, resource, or tokenEndpoint. No network-based attacker interaction is required to trigger the condition. The flaw manifests as a configuration-driven authority confusion between legitimate endpoints running inside the integration layer. See the Apache Camel CVE-2026-85317 Advisory for the authoritative description.
No verified proof-of-concept code is published. Refer to the upstream fixes in GitHub Pull Request #25834, GitHub Pull Request #25937, and GitHub Pull Request #25938 for the corrected cache key implementation.
Detection Methods for CVE-2026-85317
Indicators of Compromise
- Downstream OAuth2 resource servers logging invalid_token, insufficient_scope, or audience (aud) claim mismatches originating from a Camel integration host.
- Access logs showing a bearer token issued by one authorization server being presented to an unrelated resource server reachable from the same Camel JVM.
- Audit entries where a Camel route performed an action requiring a scope broader than the one declared in its endpoint URI.
Detection Strategies
- Inventory running Camel deployments and extract the version string from camel-core and camel-http JARs; flag any version in the affected ranges.
- Parse Camel route definitions for multiple HTTP endpoints that use oauth2ClientId but differ only in oauth2Scope, oauth2Resource, or oauth2TokenEndpoint.
- Correlate outbound HTTP calls from Camel hosts with the authorization servers and resource servers they are expected to contact.
Monitoring Recommendations
- Enable DEBUG logging on org.apache.camel.component.http during validation to confirm which token endpoint services each request.
- Forward Camel application logs and downstream API gateway logs to a centralized analytics tier for cross-referencing token issuer and audience values.
- Alert on bearer tokens whose iss or aud claim does not match the expected pairing for the originating Camel route.
How to Mitigate CVE-2026-85317
Immediate Actions Required
- Upgrade Apache Camel to 4.23.0, which contains the complete fix.
- On the 4.18.x long-term support stream, upgrade to 4.18.5.
- On the 4.22.x long-term support stream, upgrade to 4.22.1.
- Audit all Camel routes that use the HTTP component with OAuth2 and confirm that no two endpoints differ only in scope, resource, or tokenEndpoint.
Patch Information
The fix updates the OAuth2 token cache key to include every field that shapes the issued token, including client identifier, scope, resource indicator, and token endpoint URL. Entries are no longer shared between endpoints that differ in any of those fields. The patch is tracked under Apache Jira CAMEL-24456 Issue and merged through pull requests #25834, #25937, and #25938.
Workarounds
- For deployments that cannot upgrade immediately, run Camel endpoints that differ in scope, resource, or tokenEndpoint in separate JVMs so they do not share the global token cache.
- Consolidate OAuth2 configuration so that each JVM contacts a single authorization server with a single scope and resource combination.
- Where separation is not practical, disable OAuth2 caching for the affected routes and request a fresh token per exchange until the upgrade is applied.
# Verify installed Apache Camel version in a Maven project
mvn dependency:list | grep -E 'camel-core|camel-http'
# Upgrade coordinates for the fixed releases
# <dependency>
# <groupId>org.apache.camel</groupId>
# <artifactId>camel-http</artifactId>
# <version>4.23.0</version> <!-- or 4.22.1 / 4.18.5 for LTS streams -->
# </dependency>
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

