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

- Priority: **Prioritise**
- Reason: Public exploit (GitHub, Date unknown)
- Next step: Check applicability: affected before 5.21.4, 6.5 (CNA); fix release not confirmed
- Status: published
- Published: 2025-10-02 · Modified: 2025-10-02
- Aliases: UBUNTU-CVE-2025-54287, DEBIAN-CVE-2025-54287, GHSA-w2hg-2v4p-vmh6, GO-2025-4004, ALPINE-CVE-2025-54287
- Record: https://cvemate.com/vulnerability/CVE-2025-54287 · JSON: https://cvemate.com/vulnerability/CVE-2025-54287/json

## Description

```text
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.
```

## Signals

- CVSS: 7.1 high (v4.0, CVE.org) 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
- EPSS: 0.389%, percentile 35.117%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (github)

## Affected

- alpine incus (Alpine Linux): \< 6.0.6-r0
- canonical lxd: ≥ 6.0, \< 6.5 \| ≥ 5.21, \< 5.21.4 \| ≥ 4.0.0, \< 5.21.4 \| ≥ 6.1, \< 6.5
- debian incus (Debian): \< 6.0.4-2+deb13u1 \| \< 6.0.5-1
- debian lxd (Debian): All versions (No fix recorded) \| \< 5.0.2+git20231211.1364ae4-9+deb13u1
- ubuntu lxd (Ubuntu): All versions (No fix recorded)
- github.com/lxc lxd (Go): ≥ 4.0.0, \< 5.21.4 \| ≥ 6.0.0, \< 6.5.0 \| ≥ 0.0.0-20200331193331-03aab09f5b5c, \< 0.0.0-20250827065555-0494f5d47e41 \| All versions (No fix recorded)
- github.com/lxc/lxd v6 (Go): All versions (No fix recorded)

## References

- <https://github.com/canonical/lxd/security/advisories/GHSA-w2hg-2v4p-vmh6>
- <https://ubuntu.com/security/CVE-2025-54287>
- <https://www.cve.org/CVERecord?id=CVE-2025-54287>
- <https://security-tracker.debian.org/tracker/CVE-2025-54287>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-54287>
- <https://github.com/canonical/lxd>
- <https://pkg.go.dev/vuln/GO-2025-4004>
- <https://security.alpinelinux.org/vuln/CVE-2025-54287>

---

Data as of 2026-12-05T03:01:27.262Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
