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

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

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L`)
- **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:** Yes
- **Published:** 16 Feb 2023
- **Updated:** 10 Mar 2025
- **Also known as:** AZL-13673, CLEANSTART-2025-PN33710, DEBIAN-CVE-2023-25173, GHSA-hmfx-3pcx-653p, GO-2023-1574, UBUNTU-CVE-2023-25173, openSUSE-SU-2024:13295-1

## 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 (Incorrect Authorization)

## 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.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/containerd/containerd` | Go | All versions | 1.5.18, 1.6.18 |
| `github.com/containerd/containerd` | Go | All versions | 1.5.18 |
| `github.com/containerd/containerd` | Go | All versions | 1.5.18 |
| `github.com/containerd/containerd` | Go | From 1.6.0 | 1.6.18 |
| `github.com/containerd/containerd` | Go | From 1.6.0 | 1.6.18 |
| `helm` | openSUSE:Tumbleweed | All versions | 3.13.0-2.1 |

Products: 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.

## Other vulnerabilities in containerd

- [CVE-2026-53488](https://insights.sbomify.com/CVE-2026-53488/): containerd CRI — image-config `LABEL` flows to restart-monitor `binary://` logger: host-root command execution from an image pull (critical 9.4)
- [CVE-2026-53492](https://insights.sbomify.com/CVE-2026-53492/): containerd CRI checkpoint restore CDI annotation smuggling (high 8.4)
- [CVE-2026-53489](https://insights.sbomify.com/CVE-2026-53489/): containerd: Arbitrary host CRI log file read via symlink following in CRI checkpoint restore (high 8.2)
- [CVE-2025-47290](https://insights.sbomify.com/CVE-2025-47290/): Containerd vulnerable to host filesystem access during image unpack (high 7.6)
- [CVE-2026-46680](https://insights.sbomify.com/CVE-2026-46680/): containerd user ID handling bypass allows runAsNonRoot evasion (high 7.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-25173 and fix it if it is affected.

What it is: 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.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-25173 exists.

Affected packages and fixed versions:
- github.com/containerd/containerd (Go): affected all versions; fixed in 1.5.18, 1.6.18
- github.com/containerd/containerd (Go): affected all versions; fixed in 1.5.18
- github.com/containerd/containerd (Go): affected all versions; fixed in 1.5.18
- github.com/containerd/containerd (Go): affected from 1.6.0; fixed in 1.6.18
- github.com/containerd/containerd (Go): affected from 1.6.0; fixed in 1.6.18

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-25173/ (Markdown: https://insights.sbomify.com/CVE-2023-25173/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-25173
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-25173
- OSV: https://osv.dev/vulnerability/CVE-2023-25173

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-25173/
Summaries are generated and may contain mistakes; the official description above is the record.
