CVE-2023-25173 containerd supplementary groups are not set up properly

Medium 5.3 Published Updated

Attackers with container access can bypass group restrictions to gain elevated privileges or execute code due to improper supplementary group setup.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2023-25173?

CVE-2023-25173 is a medium-severity vulnerability in containerd, published on 16 Feb 2023. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

containerd is an open source container runtime. A bug was found in containerd prior to versions 1.6.18 and 1.5.18 where supplementary groups are not set up properly inside a container. If an attacker has direct access to a container and manipulates their supplementary group access, they may be able to use supplementary group access to bypass primary group restrictions in some cases, potentially gaining access to sensitive information or gaining the ability to execute code in that container. Downstream applications that use the containerd client library may be affected as well.

This bug has been fixed in containerd v1.6.18 and v.1.5.18. Users should update to these versions and recreate containers to resolve this issue. Users who rely on a downstream application that uses containerd's client library should check that application for a separate advisory and instructions. As a workaround, ensure that the `"USER $USERNAME"` Dockerfile instruction is not used. Instead, set the container entrypoint to a value similar to `ENTRYPOINT ["su", "-", "user"]` to allow `su` to properly set up supplementary groups.

Weakness: CWE-863

Which versions are affected by CVE-2023-25173?

5 open source packages ship an affected version, including github.com/containerd/containerd. It affects 1 product.

PackageAffectedFixed in
github.com/containerd/containerd GoAll versions1.5.18, 1.6.18
github.com/containerd/containerd GoAll versions1.5.18
github.com/containerd/containerd GoAll versions1.5.18
github.com/containerd/containerd GoFrom 1.6.01.6.18
github.com/containerd/containerd GoFrom 1.6.01.6.18
Linux distribution packages (1)
helm openSUSE:TumbleweedAll versions3.13.0-2.1

Products include Linuxfoundation Containerd.

How do I fix CVE-2023-25173?

Upgrade github.com/containerd/containerd to a fixed version for your release line: 1.5.18 or 1.6.18.

Is CVE-2023-25173 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-25173 exists.

Sources

Also known as AZL-13673, CLEANSTART-2025-PN33710, DEBIAN-CVE-2023-25173, GHSA-hmfx-3pcx-653p, GO-2023-1574, UBUNTU-CVE-2023-25173 and 1 more.

Is CVE-2023-25173 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free