Template injection in LXD - CVE-2025-54287

 

Template injection in LXD - CVE-2025-54287

Published: October 21, 2025 / Updated: April 9, 2026


Vulnerability identifier: #VU117414
CSH Severity: Low
CVSS v4: 6.9 [CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N]
CVE-ID: CVE-2025-54287
CWE-ID: CWE-94
Exploitation vector: Remote access
Exploit availability: Public exploit is available

Vulnerability details

The vulnerability allows a remote user to read arbitrary files on the system.

The vulnerability exists due to improper input validation within the snapshot creation functionality of the Pongo2 template engine in LXD-UI. A remote user with permissions to modify instance settings can pass specially crafted input to the application and read arbitrary files on the system.

Payload example:

{% filter urlencode|slice:":100" %}{% include "/etc/passwd" %}{%endfilter %}


Affected software

LXD
Debian Linux
lxd (Debian package)
incus (Debian package)

How to mitigate CVE-2025-54287

Install updates from vendor's website.

LXD - addressed in versions 5.0.5, 5.21.4, 6.5
lxd (Debian package) - addressed in versions 5.0.2+git20231211.1364ae4-9+deb13u1, 5.0.2-5+deb12u1
incus (Debian package) - update to 6.0.4-2+deb13u1

External References

Related Security Bulletins