Canonical LXD Arbitrary File Read via Template Injection in Snapshot Patterns
CVE-2025-54287GHSA-w2hg-2v4p-vmh6
What to do
Vendor fix available. Upgrade each affected package to the fixed version on its release line (github.com/lxc/lxd 6.5.0, 5.21.4, 0.0.0-20250827065555-0494f5d47e41), redeploy, then verify what is actually installed.
This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.
Affected packages
- Affected
- >= 0.0.0-20200331193331-03aab09f5b5c, < 0.0.0-20250827065555-0494f5d47e41>= 4.0.0, < 5.21.4>= 6.0.0, < 6.5.0
- Fixed in
- 6.5.0, 0.0.0-20250827065555-0494f5d47e41, 5.21.4
Sources
- GitHub Advisory Database and maintainer security advisories on GitHub
GitHub-reviewed advisory GHSA-w2hg-2v4p-vmh6 lists affected ranges: Go github.com/lxc/lxd >=0.0.0-20200331193331-03aab09f5b5c =4.0.0 =6.0.0 <6.5.0
VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.
Severity and exploitation
- Exploitation
- No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
- CVSS 4.0
- 7.1 · 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 · score source
- EPSS
- CVE-2025-54287: 0.38% estimated exploitation activity in the next 30 days; percentile 31.56 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description
As published by the source; long descriptions are shortened.
Impact 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. Reproduction Steps 1. Log in to LXD-UI with an account that has permissions to modify instance settings 2. Set the following template injection payload in the instance snapshot pattern: Note that the above template uses the Pongo2 template engine's include tag to read system files. It also uses urlencode and slice filters to bypass character count and type restrictions. 3. Set scheduled snapshots to run every minute and wait for snapshot generation 4. Wait about a minute and confirm that file contents can be obtained from the created snapshot name Risk The attack requires having configuration change permissions for LXD…
Dates and revisions
- Published by the source
- Last modified by the source
- Source last checked
- Revision 1 · created ·
Published from ghsa record GHSA-w2hg-2v4p-vmh6
Agent brief
Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.
# Patch Next advisory brief: CVE-2025-54287 Advisory: Canonical LXD Arbitrary File Read via Template Injection in Snapshot Patterns IDs: CVE-2025-54287, GHSA-w2hg-2v4p-vmh6 Record: https://patchnext.com/advisories/cve-2025-54287 (revision 1, source checked 26 Oct 2026, 15:14 UTC) Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected. Severity: High (CVSS 7.1) Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV. Vendor response: Vendor fix available; fixed versions by package: github.com/lxc/lxd 6.5.0, 5.21.4, 0.0.0-20250827065555-0494f5d47e41. A vendor fix does not mean a deployment is fixed. ## Affected components - Go github.com/lxc/lxd: affected >= 0.0.0-20200331193331-03aab09f5b5c, < 0.0.0-20250827065555-0494f5d47e41; >= 4.0.0, < 5.21.4; >= 6.0.0, < 6.5.0; fixed in 6.5.0, 0.0.0-20250827065555-0494f5d47e41, 5.21.4 ## Suggested inspection (read-only) - Go github.com/lxc/lxd: check the installed version with your package manager. ## Supported action Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version. ## Required regression checks - Run the test suite and a production build. - Exercise the features that depend on github.com/lxc/lxd. - Repeat the inspection and confirm that only fixed versions remain installed. ## Rollback considerations - Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward. ## Unresolved questions - Which deployments run an affected version? - Exploitation status can change. Check again before lowering the priority. - Mark the work resolved only after the fixed version is verified in production. ## Sources - Verified: https://github.com/advisories/GHSA-w2hg-2v4p-vmh6 (GitHub-reviewed advisory GHSA-w2hg-2v4p-vmh6 lists affected ranges: Go github.com/lxc/lxd >=0.0.0-20200331193331-03aab09f5b5c =4.0.0 =6.0.0 <6.5.0) Commands are suggestions: review each one before running it.
Loading voting…