Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2025-54291 — lxd

🟡 CVSS 5.3 — Medium ✅ No Known Exploit CWE-209 NVD
5.3
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Canonical LXD Project Existence Determination Through Error Handling in Image Get Function

Impact

The LXD /1.0/images endpoint is implemented as an AllowUntrusted API that requires no authentication, making it accessible to users without accounts. This API allows determining project existence through differences in HTTP status codes when accessed with the project parameter.

https://github.com/canonical/lxd/blob/43d5189564d27f6161b430ed258c8b56603c2759/lxd/images.go#L63-L69

This configuration allows access without authentication:

https://github.com/canonical/lxd/blob/43d5189564d27f6161b430ed258c8b56603c2759/lxd/daemon.go#L924-L926

This API returns a 404 error when accessing existing projects and a 403 error when accessing non-existent projects, allowing confirmation of project existence through this difference.

The problematic implementation is shown below.

First, in the error handling implementation of the imagesGet function below, project existence is checked within the projectutils.ImageProject function, and the err returned by the ImageProject function is directly returned to the user.

https://github.com/canonical/lxd/blob/43d5189564d27f6161b430ed258c8b56603c2759/lxd/i mages.go#L1781-L1788

When the project doesn't exist, the error is 404 (http.StatusNotFound), which is

returned to the user:

https://github.com/canonical/lxd/blob/43d5189564d27f6161b430ed258c8b56603c2759/lxd/db/cluster/projects.mapper.go#L237-L239

On the other hand, when the project exists but the user lacks viewing permissions, the imagesGet function returns 403 (response.Forbidden):

https://github.com/canonical/lxd/blob/43d5189564d27f6161b430ed258c8b56603c2759/lxd/images.go#L1796-L1799

Reproduction Steps

1. Send the following request without authentication to a non-existent project:

```

curl -k "https://lxd-host:8443/1.0/images?project=XXX-project"

```

Response:

```json

{"type":"error","status":"","status_code":0,"operation":"","error_code":404,"error":"fetch project: Project not found","metadata":null}

```

2. Send a request without authentication to an existing project (if a public project exists, it will be included in the response):

```

curl -k "https://lxd-host:8443/1.0/images?project=exist-project"

```

Reponse:

```

{"type":"error","status":"","status_code":0,"operation":"","error_code":403,"error":"Untrusted callers may only access public images in the default project","metadata":null}

```

Risk

The attack requires only network access to the LXD API endpoint, with no authentication needed.

The attack allows confirming the existence of projects within the LXD system by exploiting differences in HTTP status codes.

This could potentially increase the exploitability of othervulnerabilities.

Additionally, since project IDs often use meaningful names set by users, this could lead to leakage of unpublished product information. However, resource information within projects cannot be obtained, limiting the impact to existence confirmation only.

Countermeasures

It is recommended to modify the error handling in the imagesGet function to return consistent responses regardless of project existence. Specifically, when an error occurs during project existence verification, the implementation should be changed to always return a 403 (Untrusted callers may only access public images in the default project) error to unauthenticated users.

This ensures that the same error response is returned for both existing and non-existing

projects, preventing determination of project existence.

Patches

| 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 - EOL and not critical |

References

Reported by GMO Flatt Security Inc.

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality low, integrity none, availability none.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: None — an unauthenticated stranger can try it.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Unchanged — the damage stays inside the vulnerable component.
  • Confidentiality impact: Low — limited, and the attacker does not choose what is affected.
  • Integrity impact: None.
  • Availability impact: None.

Weakness class

CVE-2025-54291 is classified as CWE-209: Information Exposure Through an Error Message. Error output includes internal detail such as paths, queries or stack traces that assists an attacker.

Affected software

CVE-2025-54291 is recorded against 2 packages.

  • github.com/canonical/lxd
  • lxd (from 6.1 up to 6.5)

Timeline and source

Published on 2 October 2025 and last revised on 5 November 2025. No public exploit is currently recorded for this entry. Record sourced from NVD.

References

github.com (Web)
nvd.nist.gov (Advisory)
github.com (Package)
pkg.go.dev (Web)

Other advisories for this package

github.com/canonical/lxd has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-209: Information Exposure Through an Error Message) in other software:

CVE-2025-54291 on other distributions

Each distribution ships its own build and its own fixed version. Pick the one you run:

Details

Severity Medium
CVSS Score 5.3
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
CWE CWE-209
Public Exploit ✅ No
Source NVD
Published 2025-10-02
Updated 2026-08-20
Modified 2025-11-05
Fix URL N/A

Affected Packages

Software From version Fixed in
github.com/canonical/lxd
lxd 6.1 6.5

Similar Threats

Vulnerability Monitoring

Track new vulnerabilities in lxd

CVE-2025-54291 is rated CVSS 5.3 Medium. BotEraser monitors your WordPress installation and notifies you when software you use appears in our vulnerability database.

Set Up Free Alerts →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2025