Vulnerability · Published Oct 2, 2025 · Assigned by canonical

CVE-2025-54287Arbitrary File Read via Template Injection in Snapshot Patterns

High 7.1

In plain English

A high-severity security flaw in LXD from Canonical. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 32% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)7.1High
Exploit odds (30 days)0.4%top 68.3% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.23incus6.0.6-r0ALPINE-CVE-2025-54287
Alpine:v3.24incus6.0.6-r0ALPINE-CVE-2025-54287
Debian:13incus6.0.4-2+deb13u1DEBIAN-CVE-2025-54287
Debian:13incus6.0.4-2+deb13u1DSA-6027-1
Debian:14incus6.0.5-1DEBIAN-CVE-2025-54287
Debian:12lxdno fix listedDEBIAN-CVE-2025-54287
Debian:12lxd5.0.2-5+deb12u1DSA-6028-1
Debian:13lxd5.0.2+git20231211.1364ae4-9+deb13u1DEBIAN-CVE-2025-54287
Debian:13lxd5.0.2+git20231211.1364ae4-9+deb13u1DSA-6028-1
Gogithub.com/lxc/lxd6.5.0GHSA-w2hg-2v4p-vmh6
Gogithub.com/lxc/lxdno fix listedGO-2025-4004
Gogithub.com/lxc/lxd5.21.4GHSA-w2hg-2v4p-vmh6
Gogithub.com/lxc/lxd0.0.0-20250827065555-0494f5d47e41GHSA-w2hg-2v4p-vmh6
Gogithub.com/lxc/lxd/v6no fix listedGO-2025-4004

Affected products (as reported)

VendorProductVersions
Canonical LXD 6.0 – before 6.55.21 – before 5.21.4

Weakness: CWE-1336 · Vector: 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

References