CVE-2025-27612: Libcontainer is affected by capabilities elevation

Published Mar 21, 2025
·
Updated

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 - https://github.com/opencontainers/runc/security/advisories/GHSA-f3fp-gc8g-vw66 - https://man7.org/linux/man-pages/man7/capabilities.7.html

Other sources

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.

MITRE

Affected Software

2 affected componentsFixes available
container libcontainer<0.5.3
rust/libcontainer<0.5.3
0.5.3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade rust/libcontainer to a version that resolves this vulnerability.

    Fixed in 0.5.3
  2. Configuration

    When using libcontainer directly with the tenant builder, do not pass user-provided capabilities to the tenant builder so no capabilities are set on the tenant container.

    libcontainer (tenant builder) Tenant container capabilities inheritance/capabilities spec = Do not pass any user-provided capabilities to the tenant builder
  3. Configuration

    Alternatively, verify the capabilities of the original container and filter the user-passed capabilities before setting them on the tenant.

    libcontainer (tenant builder) Capabilities added to tenant container from user input = Filter tenant capabilities to only those present as inherited in the original container

Event History

Mar 21, 2025
CVE Published
via MITRE·02:24 PM
Data Sourced
via MITRE·02:24 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:15 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·03:18 PM
Sep 15, 57206
Event
via FIRST·08:41 PM

Frequently Asked Questions

1

What is the severity of CVE-2025-27612?

CVE-2025-27612 is considered a high-severity vulnerability due to its impact on the security of tenant containers.

2

How do I fix CVE-2025-27612?

To fix CVE-2025-27612, upgrade libcontainer to version 0.5.3 or later.

3

What is the main risk associated with CVE-2025-27612?

The main risk associated with CVE-2025-27612 is that it may allow unauthorized capability escalation in tenant containers.

4

Which versions of libcontainer are affected by CVE-2025-27612?

libcontainer versions prior to 0.5.3 are affected by CVE-2025-27612.

5

Is CVE-2025-27612 being actively exploited?

As of now, there is no public indication that CVE-2025-27612 is actively being exploited, but it is advised to apply the patch promptly.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203