All vulnerabilities

Servers and applications

CVE-2025-54287

Arbitrary File Read via Template Injection in Snapshot Patterns

Severity
High 7.1
Published
2 Oct 2025
Last changed
12 Oct 2026
Added to UpHeron
1 Nov 2026
Fixed in
5.21.4, 6.5
Exploit chance
0.4% in the next 30 daysHigher than 32% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Server-side template injection (CWE-1336)
Attack
Over the network · Needs a user account · No user action needed
Attacker can
Read data
CVSS 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Also known as
GHSA-w2hg-2v4p-vmh6
Sources
NVD, Project advisories (GitHub)

Description

In LXD's instance snapshot creation functionality, the Pongo2 template engine is used in the snapshots.pattern configuration for generating snapshot names. While code execution functionality has not been found in this template engine, it has file reading capabilities, creating a vulnerability that allows arbitrary file reading through template injection attacks.

The attack requires having configuration change permissions for LXD instances. The attack allows reading arbitrary files accessible with LXD process permissions. This could lead to leakage of the following information: -​ LXD host configuration files (/etc/passwd, /etc/shadow, etc.) -​ LXD database files (containing information about all projects and instances) -​ Configuration files and data of other instances -​ Sensitive information on the host system

Pongo2 provides mechanisms for sandboxing templates.

From canonical/lxd's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
LXDServers and applications · cpe:a:canonical:lxd
  • From 4.0.0 before 5.21.4
  • From 6.1 before 6.5
LXDServers and applications · github:canonical/lxd
  • From 4.0 before 5.21.4

About LXD

container manager for system containers

From Wikidata, CC0 1.0.
GitHub stars
4,852GitHub, 15 Nov 2026
Forks
1,074GitHub, 15 Nov 2026
Latest release
lxd-6.10.1GitHub, 15 Nov 2026
Released
28 Oct 2026GitHub
Developer
Stéphane GraberWikidata
License
AGPL-3.0GitHub
Written in
GoWikidata
First released
4 Nov 2014Wikidata
First published on GitHub
4 Nov 2014GitHub

References

  • NVD https://nvd.nist.gov/vuln/detail/CVE-2025-54287
  • CVE.org https://www.cve.org/CVERecord?id=CVE-2025-54287
  • GitHub Advisory Database https://github.com/advisories/GHSA-w2hg-2v4p-vmh6
  • github.com https://github.com/canonical/lxd/security/advisories/GHSA-w2hg-2v4p-vmh6