The critical detail in CVE-2026-66897 is not that LXD failed to write path validation — it did, using os.Root, which is the correct Go API for confined filesystem operations. The failure is that the validation and the file operation are disconnected: the check runs against a secure directory handle, but file creation uses os.Create with an unvalidated string path. This is the validation-operation substitution gap, a specific failure mode that has appeared across ecosystems for over fifteen years — PHP's is_uploaded_file() without move_uploaded_file(), Java's File.getCanonicalPath() checked while File() constructor used, Node's path.normalize() validating one reference while operations used another. LXD's vulnerability is the same pattern deployed at a higher blast radius.
What makes this a 9.9 rather than a 6.5 is LXD's architectural position: it sits at the intersection of untrusted inputs (container images), privileged operations (host filesystem access as root), and user-facing attack surfaces (container editors, image launchers). There's no compensating distance between the bypass and the consequence. The template processing code path escaped whatever security retrofit introduced os.Root elsewhere in the codebase — this is entropy, not a fresh mistake. The validation exists; it's just not connected to the code that needs it.
For defenders: audit your codebase for this exact pattern. Search for any codebase where security validation exists (os.Root, path.resolve, canonicalization functions) but file operations use raw string paths (os.Create, os.OpenFile without the validated handle). This is not a generic "path traversal" check — it's a specific code audit for validation-operation decoupling. If your project uses a confined filesystem API, every file operation after validation must consume the returned handle, never rederive a path from user input. Consider linters that flag os.Create calls within security validation contexts, and code review checklists that explicitly require confirming validation is architecturally coupled to operations, not merely present in the same file. The temporal question — whether template processing predated the os.Root retrofit — matters for understanding your own codebase's security debt. This pattern recurs because security improvements propagate outward from where they were introduced, and forgotten paths get left behind.