Skip to main content

Canonical LXD EUVDEUVD-2025-32636

| CVE-2025-54287 HIGH
Improper Neutralization of Special Elements Used in a Template Engine (CWE-1336)
2025-10-02 security@ubuntu.com GHSA-w2hg-2v4p-vmh6
7.1
CVSS 4.0 · Vendor: ubuntu
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate with instance-config permissions
  2. Delivery
    Set crafted Pongo2 snapshot pattern
  3. Exploit
    Scheduled snapshot renders include tag
  4. Execution
    LXD reads host file as root
  5. Impact
    Exfiltrate 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – 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)
v1 Mar 13, 2026 - 19:12 CVSS 6.5

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

LXD 5.21 <5.21.4
LXD 6.0 <6.5

Affected Packages

go github.com/lxc/lxd fix: 0.0.0-20250827065555-0494f5d47e41, 5.21.4, 6.5.0
go github.com/lxc/lxd/v6 no fix
euvd lxd fix: 5.21.4, 6.5

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

Vendor (ubuntu) PRIMARY 7.1 HIGH
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
vuln.today AI 6.5 MEDIUM

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).

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Ubuntu MEDIUM
SUSE 6.5 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Primary rating from Vendor (ubuntu).

CVSS VectorVendor: ubuntu

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

6
Analysis Updated
Oct 12, 2026 - 15:38 vuln.today
v2 - CVSS changed
Severity Changed
Oct 12, 2026 - 15:22 NVD
MEDIUM HIGH
CVSS changed
Oct 12, 2026 - 15:22 NVD
6.5 (MEDIUM) 7.1 (HIGH)
Patch released
Mar 31, 2026 - 21:13 nvd
Patch available
PoC Detected
Oct 22, 2025 - 15:39 vuln.today
Public exploit code
CVE Published
Oct 02, 2025 - 10:15 nvd
MEDIUM 6.5

DescriptionCVE.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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.1%
Top 81% exploitable
Prevalence
Medium
common Ubuntu/Canonical container-and-VM hypervisor, not deployed everywhere
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

56
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

More in Lxd

View all
CVE-2025-54286 HIGH POC
7.5 Oct 02

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

CVE-2025-54289 HIGH POC
7.4 Oct 02

Privilege escalation in Canonical LXD's operations API (LXD before 6.5 and LXD 5.21 before 5.21.4) allows an authenticat

CVE-2025-54293 HIGH POC
7.1 Oct 02

Authenticated remote attackers with access to the Canonical LXD instance log retrieval or deletion endpoints can read ar

CVE-2025-54290 MEDIUM POC
6.9 Oct 02

Unauthenticated project enumeration in Canonical LXD 5.21.x before 5.21.4 and 6.x before 6.5 lets remote attackers deter

CVE-2025-54291 MEDIUM POC
6.9 Oct 02

Unauthenticated remote attackers can confirm the existence of LXD projects on Canonical LXD by comparing HTTP status cod

CVE-2026-63294 CRITICAL
9.9 Aug 12

Privilege escalation to host root in Canonical LXD occurs when the container manager unpacks crafted image or backup arc

CVE-2026-66897 CRITICAL
9.9 Aug 24

Host root code execution in Canonical LXD arises from a path-traversal flaw in instance template processing, letting an

CVE-2026-112816 CRITICAL
10.0 Oct 30

Improper certificate validation in the HTTPS API listener of Canonical LXD lets an unauthenticated remote attacker prese

CVE-2026-63293 CRITICAL
9.9 Aug 12

Arbitrary host file read and write in Canonical LXD occurs because the image import/unpack routine does not verify wheth

CVE-2026-63298 CRITICAL
9.9 Aug 12

Canonical LXD's NVIDIA GPU passthrough configuration handler fails to sanitize newline characters in user-supplied `nvid

CVE-2026-66898 CRITICAL
9.9 Aug 12

Path traversal in Canonical's LXD container and VM manager allows a user with backup import/restore privileges to write

CVE-2026-62420 CRITICAL
9.9 Aug 12

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

Vendor StatusVendor

Ubuntu

Priority: Medium
lxd
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

incus
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 -
lxd
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

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy