Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/lxc/lxd
  4. ›
  5. CVE-2025-54287

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

October 2, 2025

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.

References

  • github.com/advisories/GHSA-w2hg-2v4p-vmh6
  • github.com/canonical/lxd
  • github.com/canonical/lxd/security/advisories/GHSA-w2hg-2v4p-vmh6
  • nvd.nist.gov/vuln/detail/CVE-2025-54287

Code Behaviors & Features

Detect and mitigate CVE-2025-54287 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 4.0 before 5.21.4, all versions starting from 6.0 before 6.5

Fixed versions

  • 5.21.4
  • 6.5

Solution

Upgrade to versions 5.21.4, 6.5 or above.

Impact 6.5 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine

Source file

go/github.com/lxc/lxd/CVE-2025-54287.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Fri, 03 Oct 2025 12:19:24 +0000.