5.1medium
Source Container Identification Vulnerability via cmdline Spoofing in devLXD Server
- Severity
- 5.1medium CVSS:4.0 by canonical
- Exploit likelihood
- 0.36% (higher than 32% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- canonical
- Also known as
- GHSA-7232-97c6-j525GO-2025-4001
Description
Information Spoofing in devLXD Server in Canonical LXD versions 4.0 and above on Linux container platforms allows attackers with root privileges within any container to impersonate other containers and obtain their metadata, configuration, and device information via spoofed process names in the command line.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Canonical LXD | from 6.0 before 6.5, from 5.21 before 5.21.4, from 4.0.0 before 5.21.4, from 6.1 before 6.5 | CVE List, NVD |
| github.com/canonical/lxd (Go) | from 4.0 before 5.21.4, from 6.0 before 6.5, from 0.0.0-20200331193331-03aab09f5b5c before 0.0.0-20250827065555-0494f5d47e41 | GitHub Advisory Database, Go Vulnerability Database |
All scores
| canonical | 5.1medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N |
| GitHub | 4.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:N/A:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N |
| NVD | 6.8medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
Information Spoofing in devLXD Server in Canonical LXD versions 4.0 and above on Linux container platforms allows attackers with root privileges within any container to impersonate other containers and obtain their metadata, configuration, and device information via spoofed process names in the command line.
GitHub Advisory Database
Impact
In LXD's devLXD server, the source container identification process uses process cmdline (command line) information, allowing attackers to impersonate other containers by spoofing process names.
The core issue lies in the findContainerForPID function in lxd/api_devlxd.go.
This function identifies senders through two steps as shown below:
- cmdline-based identification: Check while tracing back through parent processes, and if it starts with
[lxc monitor], extract the project name and container name from that process name in the format projectName_containerName. - PID namespace-based identification: If not found in Step 1, check against all containers' PID namespaces.
Attackers can exploit Step 1 processing to impersonate arbitrary containers across projects by spoofing process names.
Reproduction Steps
- Access devLXD server from a normal container (e.g., EEEE):
root@EEEE:~# curl --unix-socket /dev/lxd/sock http://lxd-host/1.0/meta-data
instance-id: 9f928574-2561-4eff-af82-a68e57d3c68b
local-hostname: EEEE
- Use exec -a to spoof process name and impersonate another container (DDDD):
root@EEEE:~# bash -c "exec -a '[lxc monitor]' curl --unix-socket /dev/lxd/sock http://lxd-host/1.0/meta-data -x 'test-project_DDDD'"
instance-id: 1bb2f1c3-3ad2-4cd6-9965-67b14c3582cc
local-hostname: DDDD
This attack successfully obtains metadata (instance-id, local-hostname) of another container DDDD from within container EEEE.
Risk
This vulnerability allows attackers to perform the following actions:
-
Theft of other containers' metadata information Obtaining other containers' information via devLXD API's /1.0/meta-data endpoint: https://github.com/canonical/lxd/blob/43d5189564d27f6161b430ed258c8b56603c2759/lxd/devlxd.go#L295-L304
-
Obtaining other containers' configuration information via devLXD API's /1.0/config and /1.0/config/{key} endpoints: https://github.com/canonical/lxd/blob/43d5189564d27f6161b430ed258c8b56603c2759/lxd/devlxd.go#L175-L221 https://github.com/canonical/lxd/blob/43d5189564d27f6161b430ed258c8b56603c2759/lxd/devlxd.go#L228-L267
-
Obtaining other containers' device information via devLXD API's /1.0/devices endpoint: https://github.com/canonical/lxd/blob/43d5189564d27f6161b430ed258c8b56603c2759/lxd/devlxd.go#L377-L395 Particularly in environments where multiple projects run containers on the same LXD host, inter-project information leakage may occur. The attack prerequisite is root privileges within any container.
Countermeasures
While containers basically run in separate PID namespaces, based on investigation, the [lxc monitor] process runs in the same PID namespace as the LXD execution process. Therefore, the problem can be resolved by modifying the implementation to use cmdline information only when the PID namespace of the target process matches the PID namespace of the process running LXD.
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.
Go Vulnerability Database
Canonical LXD Source Container Identification Vulnerability via cmdline Spoofing in devLXD Server in github.com/canonical/lxd
NVD (es)
La suplantación de información en el servidor devLXD en versiones 4.0 y superiores de Canonical LXD en plataformas de contenedores Linux permite a atacantes con privilegios de root dentro de cualquier contenedor suplantar a otros contenedores y obtener sus metadatos, configuración e información de dispositivos a través de nombres de proceso suplantados en la línea de comandos.
References
| https://github.com/canonical/lxd/security/advisories/GHSA-7232-97c6-j525 | advisory, exploit, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2025-54288 | advisory | |
| https://github.com/canonical/lxd | package | |
| https://pkg.go.dev/vuln/GO-2025-4001 | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-54288 changed 2025-10-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-7232-97c6-j525 changed 2026-09-10 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2025-4001 changed 2025-11-05 | CC-BY-4.0 |
| NVD | CVE-2025-54288 changed 2026-10-12 | Public domain |