/

CVE-2026-63297

Severity:

CRITICAL RISK

(9.9)

TOCTOU Authorization Bypass (CWE-367) in LXD Projects

CVE-2026-63297

Analyzed

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-367, CWE-863

Impact:

Unauthorized Privilege Configuration and Project Isolation Bypass

Severity:

CRITICAL RISK

(9.9)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A critical authorization flaw in LXD can allow an authenticated attacker to bypass target project restrictions during cross-project instance copies. If configuration checks occur before configuration merging is complete, disallowed high-privilege settings may be copied into a restricted project.

Affected context

The vulnerability may affect LXD environments that permit authenticated users to copy instances between projects while applying target-project configuration restrictions. The risk arises when authorization checks evaluate an incomplete configuration state before the final merged configuration is available.

Exploit preconditions

  • Attack surface: LXD cross-project instance copy operations
  • Required access: Authenticated access sufficient to initiate or influence an instance copy
  • Trigger point: Authorization checks performed during target-project configuration processing
  • Why exploitation is possible: The check may occur before configuration merging finishes, allowing the final instance configuration to differ from the state that was authorized

Why this happens

The underlying bug is a time-of-check to time-of-use condition, mapped primarily to CWE-367. LXD evaluates project restrictions against an intermediate configuration state, then uses a subsequently merged configuration without revalidating the complete result. This sequencing error can cause authorization decisions to be made against data that no longer represents the operation being performed. The resulting access-control failure also relates to CWE-863: Incorrect Authorization.

Potential impact

  • An attacker may copy instances with disallowed high-privilege configurations
  • Project isolation controls could be bypassed
  • Restricted projects may contain instances with elevated capabilities
  • Attackers could gain access to protected host, network, or storage resources
  • Confidentiality, integrity, and availability of workloads could be affected

General mitigation guidance

Mitigation generally focuses on making authorization decisions against the final, canonical configuration and preventing state changes between validation and use.

Common defensive patterns include:

  • Complete configuration merging before applying authorization checks
  • Revalidate the finalized configuration immediately before the privileged operation
  • Treat project restrictions as deny-by-default policy controls
  • Centralize authorization decisions so all copy paths enforce the same rules
  • Minimize instance and daemon privileges using least-privilege settings
  • Log cross-project copy requests, rejected restrictions, and effective configuration changes
  • Use transactional or otherwise atomic workflows where configuration and authorization state must remain consistent

How teams detect issues like this

Organizations can look for TOCTOU and authorization-bypass risks through:

  • Static analysis for checks performed before normalization, merging, or canonicalization
  • Code review signals involving mutable configuration objects between validation and use
  • Tests that compare authorization results for partial and fully merged configurations
  • Policy tests covering cross-project copies and restricted high-privilege settings
  • Runtime monitoring for unexpected privileged configuration changes in restricted projects
  • Automated security review tools that flag authorization decisions made before final state construction

Sources

SourceLink
github.comgithub.com/canonical/lxd/security/advisories/GHSA-v989-qw7w-xvg4

Frequently asked

questions

It may be exploitable through the LXD management interface when an attacker has authenticated access that permits initiating or influencing cross-project instance copies.

Not necessarily. The key requirement is authenticated access to an operation that reaches the vulnerable copy and configuration-merging path; the precise scope depends on deployment permissions.

Build and canonicalize the complete target configuration before authorization, then enforce the restrictions immediately before the copy operation without relying on an earlier partial check.

Use deny-by-default authorization, make configuration transitions atomic where practical, revalidate mutable state, and maintain tests for cross-tenant or cross-project operations.

Find out what's already
exploitable in your codebase.