5.9medium
Libcontainer is affected by capabilities elevation
- Severity
- 5.9medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.18% (higher than 7% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-5w4j-f78p-4wh9GO-2025-3543
Description
libcontainer is a library for container control. Prior to libcontainer 0.5.3, while creating a tenant container, the tenant builder accepts a list of capabilities to be added in the spec of tenant container. The logic here adds the given capabilities to all capabilities of main container if present in spec, otherwise simply set provided capabilities as capabilities of the tenant container. However, setting inherited caps in any case for tenant container can lead to elevation of capabilities, similar to CVE-2022-29162. This does not affect youki binary itself. This is only applicable if you are using libcontainer directly and using the tenant builder.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| youki-dev youki | < 0.5.3 | CVE List |
| libcontainer (crates.io) | before 0.5.3 | GitHub Advisory Database |
| github.com/opencontainers/runc (Go) | all versions | Go Vulnerability Database |
All scores
| GitHub_M | 5.9medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
| GitHub | 5.9medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
libcontainer is a library for container control. Prior to libcontainer 0.5.3, while creating a tenant container, the tenant builder accepts a list of capabilities to be added in the spec of tenant container. The logic here adds the given capabilities to all capabilities of main container if present in spec, otherwise simply set provided capabilities as capabilities of the tenant container. However, setting inherited caps in any case for tenant container can lead to elevation of capabilities, similar to CVE-2022-29162. This does not affect youki binary itself. This is only applicable if you are using libcontainer directly and using the tenant builder.
GitHub Advisory Database
Impact
In libcontainer, while creating a tenant container, the tenant builder accepts a list of capabilities to be added in the spec of tenant container. Code can be seen here . The logic here adds the given capabilities to all capabilities of main container if present in spec, otherwise simply set provided capabilities as capabilities of the tenant container.
However, GHSA-f3fp-gc8g-vw66 was opened on runc mentioning that setting inherited caps in any case for tenant container can lead to elevation of capabilities. For this, they added a fix here where they never set new inherited caps on tenant, and set ambient caps only if original container had inherited caps.
Similarly crun never sets inherited caps as can be seen here.
[!NOTE] This does not affect youki binary itself, as the exec implementation is partially broken and does not pass on the user-provided caps to tenant containers, this is only applicable if you are using libcontainer directly and using the tenant builder.
Workarounds
- Do not pass any user-provided capabilities to the tenant builder, in which case no capabilities will be set on tenant.
- Alternatively you can verify the capabilities of original container and filter the user passed capabilities before setting them on tenant.
References
Go Vulnerability Database
(This report has been withdrawn with reason: "Does not affect Go code."). https://nvd.nist.gov/vuln/detail/CVE-2025-27612 lists https://github.com/opencontainers/runc/security/advisories/GHSA-f3fp-gc8g-vw66 which caused automation to flag as Go; the affected repo is https://github.com/youki-dev/youki (Rust).
NVD (es)
libcontainer es una librería para el control de contenedores. Antes de libcontainer 0.5.3, al crear un contenedor de inquilinos, el generador de inquilinos aceptaba una lista de capacidades que se añadían a la especificación del contenedor. La lógica aquí añade las capacidades dadas a todas las capacidades del contenedor principal si están presentes en la especificación; de lo contrario, simplemente se establecen las capacidades proporcionadas como capacidades del contenedor de inquilinos. Sin embargo, establecer límites heredados para el contenedor de inquilinos puede provocar la elevación de capacidades, similar a CVE-2022-29162. Esto no afecta al binario de Youki. Esto solo aplica si se usa libcontainer directamente y el generador de inquilinos.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-27612 changed 2025-03-21 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-5w4j-f78p-4wh9 changed 2026-02-04 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2025-3543 changed 2025-03-26 | CC-BY-4.0 |
| NVD | CVE-2025-27612 changed 2026-06-17 | Public domain |