Template injection in LXD - CVE-2025-54287
Published: October 21, 2025 / Updated: April 9, 2026
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
Debian Linux
lxd (Debian package)
incus (Debian package)
How to mitigate CVE-2025-54287
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