Skip to content

Libcontainer is affected by capabilities elevation similar to GHSA-f3fp-gc8g-vw66

Moderate severity GitHub Reviewed Published Mar 21, 2025 in youki-dev/youki • Updated Mar 21, 2025

Package

cargo libcontainer (Rust)

Affected versions

< 0.5.3

Patched versions

0.5.3

Description

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

References

@utam0k utam0k published to youki-dev/youki Mar 21, 2025
Published by the National Vulnerability Database Mar 21, 2025
Published to the GitHub Advisory Database Mar 21, 2025
Reviewed Mar 21, 2025
Last updated Mar 21, 2025

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(3rd percentile)

Weaknesses

CVE ID

CVE-2025-27612

GHSA ID

GHSA-5w4j-f78p-4wh9

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.