Apr 21, 2026·5 min read·3 visits
A flaw in OpenBao's `lookupByAccessor` function allows tenant administrators to renew or revoke token accessors across namespace boundaries, breaking multi-tenant isolation.
OpenBao versions prior to 2.5.3 contain an improper namespace context switching vulnerability. An authenticated attacker with administrative privileges in one namespace can perform renewal or revocation operations on token accessors belonging to different namespaces, effectively bypassing multi-tenant isolation boundaries.
OpenBao uses namespaces to enforce cryptographic and administrative multi-tenant isolation. The token store manages authentication lifecycle events using token accessors, which act as non-sensitive identifiers mapped to actual secrets. This architecture allows operators to revoke or renew tokens without handling the highly sensitive authentication material directly.
CVE-2026-40264 is a boundary enforcement bypass vulnerability categorized as CWE-1259. It is located in the token store's accessor lookup logic. Versions prior to 2.5.3 fail to enforce namespace isolation when processing accessor-based operations, allowing cross-tenant interaction.
The flaw permits an administrator in one tenant to cross namespace boundaries if they possess a valid token accessor ID from another tenant. The impact is restricted to token renewal and revocation operations. It does not expose the underlying cryptographic token secrets or allow the attacker to assume the identity of the targeted token.
The root cause resides in the lookupByAccessor function within the vault/token_store.go file. This function retrieves internal token metadata using the provided non-sensitive accessor string. The lookup process is an essential prerequisite for lifecycle operations such as renewal and revocation.
Prior to version 2.5.3, the function implemented automatic context switching. When an accessor was successfully retrieved from the storage backend, the code evaluated the namespace associated with that accessor, referred to internally as accessorNS.
If the accessorNS did not match the namespace of the current API request context, the system dynamically overwrote the internal request context with the target namespace. This behavior implicitly trusted the accessor ID over the authenticated user's authorization boundaries, creating an unauthorized cross-namespace execution path.
The vulnerable implementation prioritized operational flexibility over strict isolation. By silently modifying the namespace pointer, the system allowed subsequent authorization checks to execute within the context of the target namespace. The context switch occurred seamlessly during the lookup phase, processing the request as if it originated from the victim namespace.
The patch implemented in commit 059cc5950303688335d5c8ab9af8e453795d693a replaces this implicit context switch with an explicit validation check. The code now strictly enforces that the accessor's namespace must match the requesting user's namespace context.
The remediation introduces a strict comparison logic block. If the evaluation condition evaluates to true, the function immediately returns an error, successfully neutralizing the cross-tenant bypass.
// vault/token_store.go (Patched Logic)
if accessorNS != nil && accessorNS.ID != ns.ID {
return nil, fmt.Errorf("cannot lookup token in different namespace")
}Exploiting CVE-2026-40264 requires specific preconditions, categorizing it as an attack with low complexity but high prerequisite requirements. The adversary must possess administrative privileges within a valid OpenBao namespace. This establishes the necessary authenticated session required to interact with the token management endpoints.
The attacker must also acquire a valid token accessor ID belonging to a separate namespace. Token accessors are routinely recorded in application logs, audit trails, and monitoring systems. Their presence in these secondary systems makes them substantially easier to obtain than the cryptographic tokens they represent.
The exploitation sequence begins with the attacker issuing an HTTP request to an accessor management endpoint, such as sys/auth/token/revoke-accessor. The request payload contains the leaked accessor ID from the victim tenant, while the HTTP headers carry the authentication context of the attacker's tenant.
OpenBao processes the request, triggers the flawed lookup logic, and executes the revocation or renewal operation against the victim's token. The system processes the request successfully without requiring explicit authorization in the victim namespace, resulting in localized operational disruption.
The direct security impact of CVE-2026-40264 is strictly limited to token availability and lifecycle management. An attacker cannot use this vulnerability to extract secrets, read the actual token strings, or escalate privileges within the target namespace. The confidentiality and integrity of the data protected by OpenBao remain intact.
A malicious actor can force the premature revocation of critical service tokens in neighboring tenants. This action disrupts dependent applications and infrastructure by terminating their authenticated sessions. The result is a localized denial-of-service condition affecting specific workloads relying on the revoked tokens.
Alternatively, an attacker can forcefully renew expiring tokens in other namespaces. This action extends the operational window of potentially compromised or deprecated tokens, assuming the tokens are renewable and remain within their maximum time-to-live boundaries.
The vulnerability carries a CVSS 4.0 base score of 2.0, reflecting the high privilege requirements and limited operational impact. The EPSS score of 0.00036 indicates a statistically negligible probability of exploitation in the wild within the immediate timeframe.
The definitive resolution for CVE-2026-40264 is upgrading OpenBao deployments to version 2.5.3 or later. The patch completely eliminates the vulnerable context-switching logic within the token store subsystem, replacing it with explicit boundary validation. Organizations operating multi-tenant environments should prioritize this upgrade.
Organizations unable to immediately apply the patch cannot mitigate this flaw through OpenBao configuration changes. The vulnerability resides in core routing logic, rendering access control list modifications ineffective. Upgrading the binary is the sole technical remediation.
Defenders must monitor OpenBao audit logs for cross-namespace management attempts. Anomalous patterns include auth/token/revoke-accessor or auth/token/renew-accessor requests originating from administrative accounts that do not typically manage the targeted services. Analyzing these access patterns helps identify internal reconnaissance or exploitation attempts.
Accessor leakage prevention serves as a critical defense-in-depth measure. Security teams must review logging configurations to ensure accessors are treated as sensitive metadata. Restricting access to operational logs to authorized personnel significantly increases the difficulty of fulfilling the attack prerequisites.
CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N| Product | Affected Versions | Fixed Version |
|---|---|---|
OpenBao OpenBao | < 2.5.3 | 2.5.3 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-1259 |
| Attack Vector | Network |
| CVSS 4.0 Score | 2.0 (Low) |
| EPSS Percentile | 10.53% |
| Impact | Denial of Service (Token Revocation) |
| Exploit Status | Unexploited |
| Privileges Required | High (Administrator) |
Improper Restriction of Security Token Assignment