DEV Community

yutianle
yutianle

Posted on

One Identity Provider, Many Applications, and LXD's Token Boundary

One Identity Provider, Many Applications, and LXD's Token Boundary

Centralized identity providers simplify sign-in, but they also create a shared token ecosystem. CVE-2026-135384 shows why an application must validate that a token was issued for it, not merely that the token came from a trusted provider. Canonical's advisory says LXD could accept a JWT issued to another application when oidc.audience was not set.

The affected LXD releases are earlier than 5.0.12, 5.21.10, and 6.10.2. Canonical's CVE record identifies CWE-287 and assigns CVSS 4.0 score 9.2 Critical. The vendor advisory page shows 8.1 High under CVSS 3.1. The technical issue is stable across both scoring presentations: the server did not complete the application-binding part of token verification.

The shared-provider problem

An identity provider may issue tokens to many registered applications. Each application can have its own client registration, audience, scopes, and claim policy. A signature from the provider proves that the provider issued the token. It does not prove which application was meant to receive it.

The advisory says that, apart from issuer, signature, and expiry, nothing tied the token to the LXD server unless oidc.audience was set. A token the same provider issued to a different application was accepted. That gives another application's token a path into LXD even when the bearer was never granted access to LXD.

The risk is not that every user of the provider is automatically an LXD administrator. The risk is that the trust relationship was broader than the intended application relationship. An operator with access to another client or a user who can obtain a token from it may have a credential material that LXD should reject.

Tokens without a normal user

The advisory adds that a token signed by the provider which did not name a user was accepted, with the bearer authenticated under an empty user name. That behavior is another symptom of incomplete identity validation. A resource server should know that a token represents an acceptable subject before it creates an authenticated session.

It also reports that an ID token could be accepted in place of an access token. The checks meant for the access token, including claim restrictions and shorter lifetime behavior, could then be skipped. If the wrong token type enters the authorization path, claims that normally constrain access may stop applying.

Claims and authorization

The email-claim issue is closely related but affects identity mapping rather than audience binding. When oidc.claim was unset, LXD used the token's email claim for the user name, including addresses the provider marked unverified. In email-based authorization, that can let one provider account resolve to another user's LXD identity.

The advisory recommends a non-editable claim such as sub, or provider-side restriction to verified email addresses. The point is to use an identity attribute that the user cannot choose. An application-level authorization decision should not rely on a display attribute the user can alter.

When the target is exposed

The attacker needs a signed token from the target's configured identity provider. The CVE record lists network vector, high attack complexity, no privileges, and no user interaction. The advisory says providers that sign responses for unauthenticated requests may allow token acquisition without a provider account, and the operator of another application may receive tokens during normal sign-in flows.

The target must use OIDC and an affected LXD release. A remote API that is visible but uses local authentication does not demonstrate this particular path. Conversely, an internal deployment can be affected if an attacker can present a token through a permitted management route.

Consequences for LXD

The advisory states that, without OpenFGA or an authorization scriptlet, an authenticated OIDC client has full control of the server. That means the token boundary can become a host-control boundary. LXD manages workloads and infrastructure configuration, so unauthorized API access can affect more than a single user's login session.

In deployments with delegated authorization, the result varies with the group and resource rules. A token that maps to a privileged email identity is still a serious authorization bypass. A token that maps to a low-privilege principal may limit the blast radius, but the authentication failure remains relevant because the intended identity boundary was not enforced.

Fixed releases and compensating controls

Canonical lists 5.0.12, 5.21.10, and 6.10.2 as fixed releases. Upgrade the server on its supported branch. If the deployment cannot be upgraded immediately, set oidc.audience to a value only LXD access tokens receive. Configure oidc.claim to a value users cannot alter, such as sub, or restrict provider email release to verified addresses.

The audience value must be verified at the identity provider. A generic client ID that appears in several applications' tokens does not establish application binding. The provider configuration should show that the expected value is minted for the LXD client and absent from unrelated clients.

Verification and monitoring

Test the normal LXD login, then test a token issued to another application at the same provider. Confirm that the second token is rejected. Test an ID token in the access-token position and confirm rejection. Confirm that the configured user claim maps a stable provider principal to the intended LXD user.

In logs, look for authenticated identities that have no corresponding provider account or application registration. The reviewed records do not establish active exploitation, so an anomalous login should trigger investigation rather than an unsupported compromise claim. A successful attack may look like a legitimate OIDC session if the token itself was valid.

Exposure context

The frozen ZoomEye observation recorded 12,271 matches for app="LXD" and zero for vul.cve="CVE-2026-135384". This is a product-level measurement. It cannot identify which matching systems share an identity provider with another application or which ones use OIDC at all.

References

[1] Canonical LXD security advisory GHSA-v3m9-p36m-qjqc

[2] CVE Program record for CVE-2026-135384

[3] LXD remote API authentication documentation

[4] LXD server configuration reference

Top comments (0)