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

- Severity: High 7.1 (CVSS:4.0, scored by canonical) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.39%, higher than 35% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-10-02T09:16:02.241Z
- Modified: 2026-10-12T15:10:00.207Z
- Also known as: GHSA-w2hg-2v4p-vmh6, GO-2025-4004
- Weaknesses: CWE-1336
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: canonical

## 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.

(As written by CVE List.)

## Affected

- Canonical LXD: from 6.0 before 6.5; from 5.21 before 5.21.4; from 4.0.0 before 5.21.4; from 6.1 before 6.5
- github.com/lxc/lxd (Go): from 4.0.0 before 5.21.4; from 6.0.0 before 6.5.0; from 0.0.0-20200331193331-03aab09f5b5c before 0.0.0-20250827065555-0494f5d47e41; all versions
- github.com/lxc/lxd/v6 (Go): all versions

## Every score

- canonical: CVSS:4.0 7.1 High `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`
- GitHub: CVSS:3.1 6.5 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:4.0 High `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`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`

## References

- <https://github.com/canonical/lxd/security/advisories/GHSA-w2hg-2v4p-vmh6> (exploit, advisory, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-54287> (advisory)
- <https://github.com/canonical/lxd> (package)
- <https://pkg.go.dev/vuln/GO-2025-4004> (web)

## Sources

- CVE List: [CVE-2025-54287](https://www.cve.org/CVERecord?id=CVE-2025-54287), CVE Terms of Use, modified 2025-10-02
- GitHub Advisory Database: [GHSA-w2hg-2v4p-vmh6](https://github.com/advisories/GHSA-w2hg-2v4p-vmh6), CC-BY-4.0, modified 2026-07-08
- Go Vulnerability Database: [GO-2025-4004](https://pkg.go.dev/vuln/GO-2025-4004), CC-BY-4.0, modified 2025-11-05
- NVD: [CVE-2025-54287](https://nvd.nist.gov/vuln/detail/CVE-2025-54287), Public domain, modified 2026-10-12

---

Page: https://cve.day/CVE-2025-54287 · Whole record: https://cve.day/CVE-2025-54287.json · Rebuilt by cve.day 2026-11-25T22:59:05.426Z
