Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate with instance-config permissions
-
DeliverySet crafted Pongo2 snapshot pattern
-
ExploitScheduled snapshot renders include tag
-
ExecutionLXD reads host file as root
-
ImpactExfiltrate file contents via snapshot name
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2021 - Vulnerable and Outdated Components
ASVS 5.0
V1 - Encoding and Sanitization Template injection prevention
|
| Exploitation Conditions | Requires an authenticated LXD account with permission to modify instance configuration (snapshots.pattern setting), per the GHSA advisory - this is the core limiting factor. The affected feature is instance snapshot name generation, which uses the Pongo2 template engine without sandboxing (no banned tags/filters), allowing the include/ssi/extends/import tags to read host files. Exploitation also depends on scheduled or manual snapshot creation actually running so the template is rendered. It affects default configurations of vulnerable versions (LXD >=4.0, specifically 5.21<5.21.4 and 6.0<6.5.0) because no sandbox is applied out of the box. Limiting factors: requires delegated instance-config privileges (not anonymous access) and is confidentiality-only - no write, integrity, or availability impact. |
| Impact | This is a genuine but bounded risk. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N) correctly reflects a network-reachable, low-complexity attack that nonetheless requires authenticated access with instance configuration permissions (PR:L) - it is not an unauthenticated internet-facing flaw. Impact is confidentiality-only (VC:H, VI:N/VA:N): arbitrary file read as the LXD process (typically root), with no code execution demonstrated in the Pongo2 engine. Signals are mostly consistent and point toward moderate priority rather than emergency: EPSS is very low (0.06%, 19th percentile) and the vulnerability is NOT in CISA KEV, indicating no evidence of widespread automated exploitation. However, publicly available exploit code exists (the GHSA advisory includes a working payload), which raises the practical likelihood that a malicious or compromised low-privilege LXD operator could use it. The EPSS/KEV picture (low probability, not actively exploited) combined with POC availability suggests this is a privilege-boundary/insider or post-compromise escalation concern rather than a mass-exploitation threat. Net: prioritize patching for multi-tenant or delegated-permission LXD deployments where untrusted parties hold instance-config rights; lower urgency for single-admin deployments where the attacker would already be trusted. |
| Exploit ScenarioDerived | A user granted only instance-configuration permissions in a multi-tenant LXD/LXD-UI environment sets a malicious Pongo2 template as the instance's snapshots.pattern (e.g. a payload using the include tag to read /etc/shadow or the LXD database). When a scheduled snapshot runs, the engine renders the file contents into the snapshot name, letting the low-privilege user exfiltrate host and cross-instance secrets. A working proof-of-concept payload is published in the GHSA advisory, so the attack requires no original research. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Oct 12, 2026
Server-side template injection in Canonical LXD's instance snapshot naming feature lets an authenticated user who can modify instance configuration read arbitrary files on the LXD host. The snapshots.pattern setting is rendered by the Pongo2 template engine without sandboxing, so tags such as include, ssi, extends, and import can pull in files like /etc/passwd, /etc/shadow, LXD database files, and other tenants' instance data. Publicly available exploit code exists (a crafted pattern using urlencode and slice filters to bypass length limits), though there is no confirmed active exploitation (CISA KEV) and EPSS is low at 0.06% (19th percentile); the assessed vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N confirms this is a confidentiality-only impact requiring an authenticated account with delegated instance-configuration rights.
Earlier versions of this analysis (1)
Template Injection in instance snapshot creation component in Canonical LXD (>= 4.0) allows an attacker with instance configuration permissions to read arbitrary files on the host system via speciall
RemediationAI
Upgrade to a fixed release: LXD 5.21.4 on the 5.21 LTS track or LXD 6.5.0 on the 6.x track (or the upstream Go pseudo-version 0.0.0-20250827065555-0494f5d47e41 for builds consuming the module directly); Debian users should apply DSA-6027-1 and DSA-6028-1. Vendor-released patch: 5.21.4 and 6.5.0. If upgrading is not immediately possible, the upstream advisory's own countermeasure is to sandbox the template engine by constructing a Pongo2 TemplateSet that bans the include, ssi, extends, and import tags - note that this is a deny-list and is prone to recurrence as new tags are added; the advisory itself cautions that Pongo2 exposes no API to enumerate registered tags or filters, so a strict allow-list is not straightforward and either approach requires review on every engine upgrade. As an additional compensating control, remove or restrict the instance-configuration (snapshot pattern) permission from untrusted projects and audit existing snapshots.pattern values for template syntax such as {% include %} or {% ssi %} - this reduces exposure but does not fix the underlying rendering flaw. Full details and reproduction steps are in GHSA-w2hg-2v4p-vmh6 at https://github.com/canonical/lxd/security/advisories/GHSA-w2hg-2v4p-vmh6.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 3 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
LXD is Canonical's system container and virtual machine manager. When creating instance snapshots, LXD generates snapshot names using a user-configurable template stored in the snapshots.pattern instance setting, which is evaluated by the Pongo2 template engine. CWE-1336 (Improper Neutralization of Special Elements Used in a Template Engine) describes the root cause: Pongo2 is instantiated without a sandboxing TemplateSet, so no tags or filters are banned by default and the include, ssi, extends, and import tags remain available. Because include can dereference host file paths and urlencode/slice filters can be chained to evade character-count and type restrictions on the resulting snapshot name, the rendered template name becomes an exfiltration channel for file contents. The vulnerability affects LXD builds from 4.0 onward; the Go module github.com/lxc/lxd is vulnerable below pseudo-version 0.0.0-20250827065555-0494f5d47e41, and the CPE cpe:2.3:a:canonical:lxd:*:*:*:*:*:*:*:* covers the affected product line. No memory-corruption or code-execution primitives are involved - this is a pure read primitive executed with the privileges of the LXD process.
Know when Lxd gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Remotely reachable via LXD API with low-privilege instance-config rights (PR:L, AV:N, AC:L); arbitrary host file read gives C:H but no integrity or availability impact (I:N/A:N).
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Primary rating from Vendor (ubuntu).
CVSS VectorVendor: ubuntu
Lifecycle Timeline
6DescriptionCVE.org
Template Injection in instance snapshot creation component in Canonical LXD (>= 4.0) allows an attacker with instance configuration permissions to read arbitrary files on the host system via specially crafted snapshot pattern templates using the Pongo2 template engine.
Executive ViewAI
Canonical LXD's snapshot naming feature can allow an authenticated user with delegated instance-configuration rights to read sensitive files from the LXD host, potentially exposing credentials, database contents, and other tenants' data. Because publicly available exploit code exists and the issue requires only a valid low-privilege account, organizations hosting shared or multi-tenant LXD environments should prioritize remediation to prevent confidentiality breaches. Leadership should care because a malicious or compromised tenant could access host-level secrets and cross-tenant information, undermining trust and compliance.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Cross-site request forgery in the LXD-UI component of Canonical LXD 5.0 before 5.0.5, 5.1 before 5.21.4, and 6.0 before
Privilege escalation in Canonical LXD's operations API (LXD before 6.5 and LXD 5.21 before 5.21.4) allows an authenticat
Authenticated remote attackers with access to the Canonical LXD instance log retrieval or deletion endpoints can read ar
Unauthenticated project enumeration in Canonical LXD 5.21.x before 5.21.4 and 6.x before 6.5 lets remote attackers deter
Unauthenticated remote attackers can confirm the existence of LXD projects on Canonical LXD by comparing HTTP status cod
Privilege escalation to host root in Canonical LXD occurs when the container manager unpacks crafted image or backup arc
Host root code execution in Canonical LXD arises from a path-traversal flaw in instance template processing, letting an
Improper certificate validation in the HTTPS API listener of Canonical LXD lets an unauthenticated remote attacker prese
Arbitrary host file read and write in Canonical LXD occurs because the image import/unpack routine does not verify wheth
Canonical LXD's NVIDIA GPU passthrough configuration handler fails to sanitize newline characters in user-supplied `nvid
Path traversal in Canonical's LXD container and VM manager allows a user with backup import/restore privileges to write
Authorization bypass in Canonical LXD (6.0 before 6.10, 5.21.x before 5.21.6, 5.0.x before 5.0.8) lets an authenticated
Same technique Code Injection
View allVendor StatusVendor
Ubuntu
Priority: Medium| Release | Status | Version |
|---|---|---|
| jammy | DNE | - |
| noble | DNE | - |
| plucky | DNE | - |
| upstream | needs-triage | - |
| bionic | not-affected | code not present |
| focal | not-affected | installs LXD snap |
| xenial | not-affected | code not present |
| questing | DNE | - |
Debian
| Release | Status | Fixed Version | Urgency |
|---|---|---|---|
| trixie | fixed | 6.0.4-2+deb13u1 | - |
| trixie (security) | fixed | 6.0.4-2+deb13u4 | - |
| forky, sid | fixed | 6.0.5-8 | - |
| (unstable) | fixed | 6.0.5-1 | - |
| Release | Status | Fixed Version | Urgency |
|---|---|---|---|
| bookworm | fixed | 5.0.2-5+deb12u1 | - |
| bookworm (security) | fixed | 5.0.2-5+deb12u3 | - |
| trixie | fixed | 5.0.2+git20231211.1364ae4-9+deb13u1 | - |
| trixie (security) | fixed | 5.0.2+git20231211.1364ae4-9+deb13u3 | - |
| (unstable) | fixed | (unfixed) | - |
SUSE
Severity: Medium| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
EUVD-2025-32636
GHSA-w2hg-2v4p-vmh6
NVD
CVE.org
EPSS
Exploit-DB