Summary
Canonical LXD Path Traversal Vulnerability in Instance Log File Retrieval Function
Impact
Although outside the scope of this penetration test, a path traversal vulnerability exists in the validLogFileName function that validates log file names in lxd/instance_logs.go in the LXD 5.0 LTS series.
This vulnerability was fixed in PR #15022 in February 2025, and is fixed in at least LXD 5.21 and later. However, this PR appears to be primarily aimed at code improvement rather than vulnerability fixing, with the vulnerability being fixed as a side effect. Therefore, no CVE number has been issued, and no security patch has been made for LXD 5.0 and earlier.
However, since LXD 5.0 LTS is still in its support period and installation procedures are explained in official documentation, we judge that environments affected by this vulnerability likely exist and report it.
Implementation in vulnerable versions (LXD 5.0 LTS series):
This function allows filenames starting with snapshot_ or migration_, but lacks sufficient validation for the portion after the prefix, enabling path traversal attacks. The fixed version is as follows:
Implementation in fixed versions (LXD 5.21 and later):
This function ensures that filenames do not contain /, , or .. .
Note that in Linux generally, path traversal like /not_exist_folder/../exist_folder/ is rejected within system calls and doesn't
succeed.
However, in this case, the attack succeeds because URL normalization by golang's filepath.Join is performed beforehand.
Related part of instanceLogGet function:
Related part of instanceLogDelete function:
In the fixed version, filenames containing path traversal strings are rejected at the validLogFileName stage through pre-checking by shared.IsFileName.
Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.
CVE-2025-54293 has a CVSS score of 6.5 (High). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (5.21.4, 6.5, 0.0.0-20250224180022-ec09b24179f3); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
| LXD Series | Status |
|---|---|
| 6 | Fixed in LXD 6.5 |
| 5.21 | Fixed in LXD 5.21.4 |
| 5.0 | Ignored - Not critical |
| 4.0 | Ignored - Not critical |
Frequently Asked Questions
- What is CVE-2025-54293? CVE-2025-54293 is a high-severity path traversal vulnerability in github.com/canonical/lxd (go), affecting versions >= 4.0, < 5.21.4. It is fixed in 5.21.4, 6.5, 0.0.0-20250224180022-ec09b24179f3. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
- How severe is CVE-2025-54293? CVE-2025-54293 has a CVSS score of 6.5 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of github.com/canonical/lxd are affected by CVE-2025-54293? github.com/canonical/lxd (go) versions >= 4.0, < 5.21.4 is affected.
- Is there a fix for CVE-2025-54293? Yes. CVE-2025-54293 is fixed in 5.21.4, 6.5, 0.0.0-20250224180022-ec09b24179f3. Upgrade to this version or later.
- Is CVE-2025-54293 exploitable, and should I be worried? Whether CVE-2025-54293 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2025-54293 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2025-54293?
- Upgrade
github.com/canonical/lxdto 5.21.4 or later - Upgrade
github.com/canonical/lxdto 6.5 or later - Upgrade
github.com/canonical/lxdto 0.0.0-20250224180022-ec09b24179f3 or later
- Upgrade