{"id":"GHSA-w2hg-2v4p-vmh6","revision":null,"records":[{"revision":"55e3be9e8839485db0f971ebd10e93a1","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2025-54287","aliases":[],"title":"Arbitrary File Read via Template Injection in Snapshot Patterns","description":"Template Injection in instance snapshot creation component in Canonical LXD (>= 4.0) allows an attacker with instance configuration \npermissions to read arbitrary files on the host system via specially crafted snapshot pattern templates using the Pongo2 template engine.","state":0,"publishedAt":"2025-10-02T09:16:02.241+00:00","modifiedAt":"2025-10-02T13:27:42.957+00:00","affected":[{"ecosystem":"Vendor product","name":"LXD","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"defaultStatus\": \"unaffected\",\n                    \"product\": \"LXD\",\n                    \"repo\": \"https://github.com/canonical/lxd\",\n                    \"vendor\": \"Canonical\",\n                    \"versions\": [\n                        {\n                            \"lessThan\": \"6.5\",\n                            \"status\": \"affected\",\n                            \"version\": \"6.0\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"lessThan\": \"5.21.4\",\n                            \"status\": \"affected\",\n                            \"version\": \"5.21\",\n                            \"versionType\": \"semver\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 4.0","vector":"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":7.1,"severity":"HIGH"}],"references":["https://github.com/canonical/lxd/security/advisories/GHSA-w2hg-2v4p-vmh6"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2025-54287","license":"CVE Program Terms of Use","key":"cve-program:CVE-2025-54287","identifiers":["CVE-2025-54287"]},"retained":false,"historicalAffected":[]},{"revision":"eda321fd9fc247ba9c2d8d5ab1282e18","observedAt":"2026-11-09T09:15:59.836+00:00","statement":{"source":"euvd","id":"EUVD-2025-32636","aliases":["CVE-2025-54287","GHSA-w2hg-2v4p-vmh6"],"title":"Template Injection in instance snapshot creation component in Canonical LXD (>= 4.0) allows an attacker with instance configuration ","description":"Template Injection in instance snapshot creation component in Canonical LXD (>= 4.0) allows an attacker with instance configuration \npermissions to read arbitrary files on the host system via specially crafted snapshot pattern templates using the Pongo2 template engine.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 4.0","vector":"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":7.1,"severity":null}],"references":["https://github.com/canonical/lxd/security/advisories/GHSA-w2hg-2v4p-vmh6"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-32636","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Oct 2, 2025, 9:16:02 AM","dateUpdated":"Oct 2, 2025, 1:27:42 PM"},"relatedAdvisories":[{"id":"openSUSE-SU-2025:15710-1","title":"govulncheck-vulndb-0.0.20251105T184115-1.1 on GA media","vulnerabilityIds":["CVE-2016-11063","CVE-2016-11066","CVE-2016-11067","CVE-2016-11068","CVE-2016-11069","CVE-2016-11070","CVE-2016-11071","CVE-2016-11072","CVE-2016-11073","CVE-2016-11074","CVE-2016-11075","CVE-2016-11076","CVE-2016-11077","CVE-2016-11078","CVE-2016-11079","CVE-2016-11080","CVE-2016-11081","CVE-2016-11082","CVE-2016-11083","CVE-2016-11084","CVE-2017-18872","CVE-2023-32199","CVE-2024-58269","CVE-2025-10545","CVE-2025-10678","CVE-2025-10954","CVE-2025-11374","CVE-2025-11375","CVE-2025-11579","CVE-2025-11621","CVE-2025-12044","CVE-2025-26625","CVE-2025-27093","CVE-2025-41410","CVE-2025-41443","CVE-2025-54286","CVE-2025-54287","CVE-2025-54288","CVE-2025-54289","CVE-2025-54290","CVE-2025-54291","CVE-2025-54293","CVE-2025-54469","CVE-2025-54470","CVE-2025-54471","CVE-2025-54499","CVE-2025-58073","CVE-2025-58075","CVE-2025-58356","CVE-2025-59043","CVE-2025-59048","CVE-2025-59530","CVE-2025-59836","CVE-2025-59937","CVE-2025-61141","CVE-2025-61524","CVE-2025-61581","CVE-2025-61688","CVE-2025-62156","CVE-2025-62157","CVE-2025-62375","CVE-2025-62506","CVE-2025-62513","CVE-2025-62705","CVE-2025-62714","CVE-2025-62725","CVE-2025-62820","CVE-2025-64101","CVE-2025-64102","CVE-2025-64103"]}],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2025-32636","identifiers":["EUVD-2025-32636","CVE-2025-54287","GHSA-w2hg-2v4p-vmh6"]},"retained":false,"historicalAffected":[]},{"revision":"f575fb0b91064ba8a3fa1c6a397afc7e","observedAt":"2026-10-25T02:25:06.051+00:00","statement":{"source":"nvd","id":"CVE-2025-54287","aliases":[],"title":"Template Injection in instance snapshot creation component in Canonical LXD (>= 4.0) allows an attacker with instance configuration ","description":"Template Injection in instance snapshot creation component in Canonical LXD (>= 4.0) allows an attacker with instance configuration \npermissions to read arbitrary files on the host system via specially crafted snapshot pattern templates using the Pongo2 template engine.","state":0,"publishedAt":"2025-10-02T10:15:38.707+00:00","modifiedAt":"2026-10-12T15:10:00.207+00:00","affected":[],"metrics":[{"system":"CVSS 4.0 · security@ubuntu.com · Secondary","vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","score":7.1,"severity":"HIGH"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":6.5,"severity":"MEDIUM"}],"references":["https://github.com/canonical/lxd/security/advisories/GHSA-w2hg-2v4p-vmh6"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2025-54287","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Analyzed","weaknesses":["CWE-1336"],"productCriteria":["cpe:2.3:a:canonical:lxd:*:*:*:*:*:*:*:*","cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*"],"sourceDates":{"published":"2025-10-02T10:15:38.707","lastModified":"2026-10-12T15:10:00.207"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2025-54287","identifiers":["CVE-2025-54287"]},"retained":false,"historicalAffected":[]},{"revision":"3ff179d89110435da8e26731538efcae","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-w2hg-2v4p-vmh6","aliases":["CVE-2025-54287","GO-2025-4004"],"title":"Canonical LXD Arbitrary File Read via Template Injection in Snapshot Patterns","description":"### Impact\nIn 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.\n\n### Reproduction Steps\n\n1. Log in to LXD-UI with an account that has permissions to modify instance settings\n2. Set the following template injection payload in the instance snapshot pattern:\n\n```\n{% filter urlencode|slice:\":100\" %}{% include \"/etc/passwd\" %}{%endfilter %}\n```\n\nNote 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.\n\n3. Set scheduled snapshots to run every minute and wait for snapshot generation\n4. Wait about a minute and confirm that file contents can be obtained from the created snapshot name\n\n### Risk\nThe attack requires having configuration change permissions for LXD instances.\nThe attack allows reading arbitrary files accessible with LXD process permissions. This could lead to leakage of the following information:\n-​ LXD host configuration files (/etc/passwd, /etc/shadow, etc.)\n-​ LXD database files (containing information about all projects and instances)\n-​ Configuration files and data of other instances\n-​ Sensitive information on the host system\n\n### Countermeasures\nPongo2 provides mechanisms for sandboxing templates.\n\n> Template sandboxing (directory patterns, banned tags/filters)\n( https://github.com/flosch/pongo2/tree/master?tab=readme-ov-file#features )\n\nThis functionality allows banning specific tags and filters by generating a custom TemplateSet.\n\nAt minimum, the following tags are considered to pose a risk of file leakage on the LXD host when used. Therefore, banning these can provide countermeasures against file reading attacks.\n-​ include\n-​ ssi\n-​ extends\n-​ import\n\nThe deny-list approach is prone to vulnerability recurrence due to missed countermeasures or new feature additions. Therefore, as the safest approach, we recommend using an allow-list format to permit only necessary functions.\n\nHowever, as far as our investigation shows, pongo2 does not have functionality to retrieve a list of registered tags or filters, nor does it provide means to implement an allow-list approach. Therefore, it is necessary to either forcibly obtain the registration list through reflection and ban anything not on the allow-list, or ban everything from the current implemented list since the library has not been updated for about two years.\n\nIn LXD's implementation, template injection attacks can be prevented by modifying the `RenderTemplate` function in `shared/util.go` to use a restricted `TemplateSet` as shown above.\n\n### Patches\n\n| LXD Series  | Status |\n| ------------- | ------------- |\n| 6 | Fixed in LXD 6.5  |\n| 5.21 | Fixed in LXD 5.21.4  |\n| 5.0 | Ignored - Not critical  |\n| 4.0  | Ignored - EOL and not critical |\n\n### References\nReported by GMO Flatt Security Inc.","state":0,"publishedAt":"2025-10-02T21:21:33+00:00","modifiedAt":"2026-07-08T07:59:26.0074249+00:00","affected":[{"ecosystem":"Go","name":"github.com/lxc/lxd","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"4.0.0"},{"kind":"fixed","version":"5.21.4"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/lxc/lxd","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"6.0.0"},{"kind":"fixed","version":"6.5.0"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/lxc/lxd","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.0.0-20200331193331-03aab09f5b5c"},{"kind":"fixed","version":"0.0.0-20250827065555-0494f5d47e41"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":null,"severity":null},{"system":"CVSS_V4","vector":"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":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/canonical/lxd/security/advisories/GHSA-w2hg-2v4p-vmh6","https://nvd.nist.gov/vuln/detail/CVE-2025-54287","https://github.com/canonical/lxd","https://pkg.go.dev/vuln/GO-2025-4004"],"sourceUrl":"https://github.com/advisories/GHSA-w2hg-2v4p-vmh6","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-w2hg-2v4p-vmh6","identifiers":["GHSA-w2hg-2v4p-vmh6","CVE-2025-54287","GO-2025-4004"]},"retained":false,"historicalAffected":[]},{"revision":"97247c6ddfb84ad79da494e2fac1861c","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2025-4004","aliases":["CVE-2025-54287","GHSA-w2hg-2v4p-vmh6"],"title":"Canonical LXD Arbitrary File Read via Template Injection in Snapshot Patterns in github.com/lxc/lxd","description":"Canonical LXD Arbitrary File Read via Template Injection in Snapshot Patterns in github.com/lxc/lxd","state":0,"publishedAt":"2025-11-05T18:41:15+00:00","modifiedAt":"2025-11-05T19:57:36.020117+00:00","affected":[{"ecosystem":"Go","name":"github.com/lxc/lxd","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/lxc/lxd/v6","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/canonical/lxd/security/advisories/GHSA-w2hg-2v4p-vmh6"],"sourceUrl":"https://osv.dev/vulnerability/GO-2025-4004","license":"OSV · upstream source license applies","key":"osv:GO-2025-4004","identifiers":["GO-2025-4004","CVE-2025-54287","GHSA-w2hg-2v4p-vmh6"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-10T11:25:04.0778179+00:00","complete":true,"records":1773,"lastAttemptAt":"2026-11-10T11:25:04.0778179+00:00","lastSuccessAt":"2026-11-10T11:25:05.0136335+00:00","error":null,"lastVerifiedAt":"2026-11-10T11:25:05.0136358+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-8859cf40d4337e24bd2f258cc7778fbad01bb24c79d057aaf34cf1dfc6f8917d-7f63d5ae9ad1cf5d15daca54e2cb44cc953d9727a9c4dbe21f340d16ec79e07a","complete":true,"records":421929,"lastAttemptAt":"2026-11-10T11:21:40.8171583+00:00","lastSuccessAt":"2026-11-10T11:21:40.7840841+00:00","error":null,"lastVerifiedAt":"2026-11-10T11:21:40.8171583+00:00","snapshotPublishedAt":"2026-11-10T10:23:15+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-d438db76762e40e09fae683c91dc71f3","complete":true,"records":13691,"lastAttemptAt":"2026-11-10T11:26:02.3053181+00:00","lastSuccessAt":"2026-11-10T11:26:02.298+00:00","error":null,"lastVerifiedAt":"2026-11-10T11:26:02.298+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13744,"expectedIdentifiers":13744,"failedIdentifiers":0},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-10T11:25:04.0778179+00:00","complete":true,"records":1096,"lastAttemptAt":"2026-11-10T11:25:04.0778179+00:00","lastSuccessAt":"2026-11-10T11:25:05.0144698+00:00","error":null,"lastVerifiedAt":"2026-11-10T11:25:05.0144706+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-c3b5116d0840469fb49189e776b1e7eb","complete":false,"records":13697,"lastAttemptAt":"2026-11-10T11:25:33.4594859+00:00","lastSuccessAt":"2026-11-10T11:25:33.455+00:00","error":"100 identifier lookups failed; latest failures include request timeout. Other identifiers were checked independently.","lastVerifiedAt":"2026-11-10T11:25:33.455+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13642,"expectedIdentifiers":13744,"failedIdentifiers":100},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-cdffb4589856378aa42e8d1bd4a6c74e27a180d8160bf764c44715ef760f0a62","complete":true,"records":9932,"lastAttemptAt":"2026-11-10T11:25:03.699196+00:00","lastSuccessAt":"2026-11-10T00:04:19.8260565+00:00","error":null,"lastVerifiedAt":"2026-11-10T11:25:03.699196+00:00","snapshotPublishedAt":"2026-11-09T23:48:01+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-26503967ae4379db8f374089589d6e03fb15bd31f820c9e992aaf93840c2236c","complete":true,"records":1971,"lastAttemptAt":"2026-11-10T11:21:41.0754601+00:00","lastSuccessAt":"2026-11-09T21:02:20.472473+00:00","error":null,"lastVerifiedAt":"2026-11-10T11:21:41.0754601+00:00","snapshotPublishedAt":"2026-11-09T20:18:18+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-94169eec81ea3989aa551092397ff34ae53c104b4a6ce646e1524452e4ab2a39","complete":true,"records":3065,"lastAttemptAt":"2026-11-10T11:25:03.948442+00:00","lastSuccessAt":"2026-11-10T08:04:45.5923716+00:00","error":null,"lastVerifiedAt":"2026-11-10T11:25:03.948442+00:00","snapshotPublishedAt":"2026-11-10T06:48:01+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-86f40cdda9ca36627f818d0cc8237a8a8c7c22cb687d6747a4ea12bded69e17e","complete":true,"records":231599,"lastAttemptAt":"2026-11-10T11:25:02.6977972+00:00","lastSuccessAt":"2026-11-10T11:25:00.8551311+00:00","error":null,"lastVerifiedAt":"2026-11-10T11:25:02.6977972+00:00","snapshotPublishedAt":"2026-11-10T11:03:07+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}