Description
Use of Cache Containing Sensitive Information vulnerability in Apache Camel Oauth component.



This issue affects Apache Camel: from 4.19.0 before 4.22.2.



OAuthClientCredentialsTokenResolver obtains OAuth 2.0 bearer tokens through the client credentials grant on behalf of the components that authenticate their outbound calls with a named OAuth profile, such as camel-openai, camel-langchain4j-agent, camel-huggingface, camel-docling, camel-a2a, camel-spring-ai-chat and the IBM watsonx components, and of applications that call the OAuthClientAuthenticationFactory SPI directly. It kept the tokens it obtained in a static cache shared by every resolver instance and every CamelContext in the JVM, and keyed that cache on the token endpoint and the client ID only, although the token request also carries the client secret and the requested scope. Two profiles that share a token endpoint and a client ID but request different scopes, or authenticate with different client secrets, therefore mapped to the same cache entry: the profile that resolved a token first populated the entry, and the other profile was then handed that token, with no token request made under its own configuration, for as long as the token remained valid. Token caching is enabled by default, and pointing several profiles at one identity provider client is an ordinary use of the profile support rather than an opt-in to an insecure setting. The outcome is an outbound request that carries a token issued for another profile's scope, which can grant broader authority than the calling profile was configured for, or reach a service the token was not issued for; with identity providers that derive a token's audience from the requested scope, a different scope can mean a token for a different service altogether. A profile configured with a different client secret was likewise served the token obtained with the other secret, without authenticating with its own. The profiles are configured by the deployment, which is trusted, so no untrusted input reaches the cache: the party that gains is the service that receives a token it was not meant to receive, which, if hostile or compromised, can replay that token within its scope. Reaching the issue requires a deployment that defines more than one profile sharing a token endpoint and client ID while differing in scope or client secret.

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.2. The 4.19.x to 4.21.x release lines reached end of life before this issue was resolved and will not receive a fix, so deployments on them must move to a supported release. For deployments that cannot upgrade immediately, disable token caching on every OAuth profile that shares a token endpoint and client ID with another profile, by setting camel.oauth.NAME.cache-tokens=false for a named profile or camel.oauth.cache-tokens=false for the default one, so that each resolution requests a token with that profile’s own scope and client secret, at the cost of a token request on every resolution. Alternatively, register a separate client at the identity provider for each profile that needs a different scope or client secret, so that no two such profiles share a client ID.
Published: 2026-10-26
Score: 4.8 Medium
EPSS: n/a
KEV: No
Impact: Unauthorized Token Escalation
Action: Patch
AI Analysis

Impact

The Camel‑OAuth component caches bearer tokens it obtains via the client credentials grant in a static, JVM‑wide store keyed only on the token endpoint and client ID. When two OAuth profiles share a token endpoint and client ID but request different scopes or use different client secrets, the first profile to resolve a token populates the cache and the second profile is subsequently served that same token. This can result in an outbound request carrying a token that grants broader authority than the calling profile was intended to use, or even a token for a different service if the audience is derived from the requested scope. The flaw is a use‑of‑cache‑containing‑sensitive‑information vulnerability, allowing a component or application to use an unauthorized token within its own JVM process.

Affected Systems

Apache Camel 4.19.0 through 4.22.1 (inclusive). Versions 4.18.x and earlier are not affected. The affected component is the Oauth module used by various Camel integrations such as camel‑openai, camel‑langchain4j‑agent, camel‑huggingface, and others. Deployments that define multiple OAuth profiles sharing the same token endpoint and client ID while differing in scope or client secret are vulnerable.

Risk and Exploitability

The CVSS base score of 4.8 indicates moderate severity. EPSS data is not available, and the vulnerability is not listed in CISA KEV, suggesting a lower likelihood of widespread exploitation, but the attack vector requires a misconfigured deployment with multiple profiles sharing credentials. If such a configuration exists, an attacker within the same JVM process could obtain a token with a wider scope, enabling unauthorized access to protected resources.

Generated by OpenCVE AI on October 26, 2026 at 16:41 UTC.

Remediation

Vendor Solution

Upgrade to Apache Camel 4.23.0, which fixes the issue. Users on the 4.22.x stream should upgrade to 4.22.2. The 4.19.x to 4.21.x release lines reached end of life before this issue was resolved and will not receive a fix, so deployments on them must move to a supported release. The token cache is now keyed on every input of the token request: the token endpoint, the client ID, a SHA-256 fingerprint of the client secret, so that the raw secret is not kept in the cache, and the requested scope, so profiles that differ in credentials or scope obtain separate tokens while equivalent profiles still share one. The 4.18.x line and earlier never carried the client credentials token resolver and are not affected.


Vendor Workaround

Disable token caching on every OAuth profile that shares a token endpoint and client ID with another profile, by setting camel.oauth.NAME.cache-tokens=false for a named profile or camel.oauth.cache-tokens=false for the default one, so that each resolution requests a token with that profile's own scope and client secret, at the cost of a token request on every resolution. Alternatively, register a separate client at the identity provider for each profile that needs a different scope or client secret, so that no two such profiles share a client ID.


OpenCVE Recommended Actions

  • Upgrade to Apache Camel 4.23.0; for 4.22.x streams upgrade to 4.22.2 immediately.
  • If an upgrade is not yet possible, disable token caching on every OAuth profile that shares a token endpoint and client ID with another profile by setting camel.oauth.NAME.cache-tokens=false for a named profile or camel.oauth.cache-tokens=false for the default profile, ensuring each token request uses its own scope and client secret.
  • Alternatively, register a separate client at the identity provider for each profile requiring a different scope or client secret so that no two profiles share a client ID.

Generated by OpenCVE AI on October 26, 2026 at 16:41 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 26 Oct 2026 17:45:00 +0000

Type Values Removed Values Added
First Time appeared Apache
Apache apache Camel
Apache camel
Vendors & Products Apache
Apache apache Camel
Apache camel

Mon, 26 Oct 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 26 Oct 2026 15:00:00 +0000

Type Values Removed Values Added
Description Use of Cache Containing Sensitive Information vulnerability in Apache Camel Oauth component. This issue affects Apache Camel: from 4.19.0 before 4.22.2. OAuthClientCredentialsTokenResolver obtains OAuth 2.0 bearer tokens through the client credentials grant on behalf of the components that authenticate their outbound calls with a named OAuth profile, such as camel-openai, camel-langchain4j-agent, camel-huggingface, camel-docling, camel-a2a, camel-spring-ai-chat and the IBM watsonx components, and of applications that call the OAuthClientAuthenticationFactory SPI directly. It kept the tokens it obtained in a static cache shared by every resolver instance and every CamelContext in the JVM, and keyed that cache on the token endpoint and the client ID only, although the token request also carries the client secret and the requested scope. Two profiles that share a token endpoint and a client ID but request different scopes, or authenticate with different client secrets, therefore mapped to the same cache entry: the profile that resolved a token first populated the entry, and the other profile was then handed that token, with no token request made under its own configuration, for as long as the token remained valid. Token caching is enabled by default, and pointing several profiles at one identity provider client is an ordinary use of the profile support rather than an opt-in to an insecure setting. The outcome is an outbound request that carries a token issued for another profile's scope, which can grant broader authority than the calling profile was configured for, or reach a service the token was not issued for; with identity providers that derive a token's audience from the requested scope, a different scope can mean a token for a different service altogether. A profile configured with a different client secret was likewise served the token obtained with the other secret, without authenticating with its own. The profiles are configured by the deployment, which is trusted, so no untrusted input reaches the cache: the party that gains is the service that receives a token it was not meant to receive, which, if hostile or compromised, can replay that token within its scope. Reaching the issue requires a deployment that defines more than one profile sharing a token endpoint and client ID while differing in scope or client secret. 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.2. The 4.19.x to 4.21.x release lines reached end of life before this issue was resolved and will not receive a fix, so deployments on them must move to a supported release. For deployments that cannot upgrade immediately, disable token caching on every OAuth profile that shares a token endpoint and client ID with another profile, by setting camel.oauth.NAME.cache-tokens=false for a named profile or camel.oauth.cache-tokens=false for the default one, so that each resolution requests a token with that profile’s own scope and client secret, at the cost of a token request on every resolution. Alternatively, register a separate client at the identity provider for each profile that needs a different scope or client secret, so that no two such profiles share a client ID.
Title Apache Camel: Camel-OAuth Cross-Scope Token Reuse via an Under-Keyed JVM-Global Client Credentials Token Cache
Weaknesses CWE-524
References
Metrics cvssV3_1

{'score': 4.8, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N'}


Subscriptions

Apache Apache Camel Camel
cve-icon MITRE

Status: PUBLISHED

Assigner: apache

Published:

Updated: 2026-10-26T15:35:49.712Z

Reserved: 2026-09-21T13:06:48.343Z

Link: CVE-2026-94386

cve-icon Vulnrichment

Updated: 2026-10-26T15:31:32.724Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-10-26T15:16:46.727

Modified: 2026-10-26T16:54:08.707

Link: CVE-2026-94386

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-26T17:30:15Z

Weaknesses
  • CWE-524

    Use of Cache Containing Sensitive Information