CVE-2023-25809: rootless: /sys/fs/cgroup is writable when cgroupns isn't unshared in runc

Summary

30/03/2023
Yes i
Low
2.5

CVE-2023-25809: rootless: /sys/fs/cgroup is writable when cgroupns isn't unshared in runc. Affects github.com/opencontainers/runc versions < 1.1.5. Fixed in 1.1.5. How to fix ↓

Also tracked for

The same CVE-2023-25809 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The package under scrutiny is github.com/opencontainers/runc, which is written in Go. Runc is a lightweight, portable container runtime that is part of the Open Container Initiative (OCI) project. It provides an interface for creating and managing containers on Linux systems. Runc allows users to run containers securely by isolating them from the host system. However, a vulnerability has been discovered in runc that allows a container to gain write access to user-owned cgroup hierarchy /sys/fs/cgroup/user.slice/... on the host. This vulnerability affects runc when it is executed inside the user namespace without unsharing the cgroup namespace or when executed outside the user namespace with /sys mounted as rbind, ro.

Vulnerability Detail

The vulnerability in runc arises from the fact that it makes /sys/fs/cgroup writable under certain conditions. When runc is executed inside the user namespace without unsharing the cgroup namespace or when executed outside the user namespace with /sys mounted as rbind, ro, a container can gain write access to the user-owned cgroup hierarchy on the host. This can potentially allow an attacker to modify the cgroup settings and disrupt the behavior of other containers or the host system. It is important to note that only user-owned cgroup hierarchies are affected, and other users' hierarchies remain unaffected.

How To Fix

Latest published version: v1.5.2 as of 22 Oct 2026

go get github.com/opencontainers/runc@v1.5.2

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.1.5

This is the first release that contains the fix.

go get github.com/opencontainers/runc@v1.1.5

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There are two possible workarounds for this vulnerability:

  1. Condition 1: Unshare the cgroup namespace by executing runc with the '--cgroupns=private' flag. This can be done with the following command: '(docker|podman|nerdctl) run --cgroupns=private'. This is the default behavior of Docker/Podman/nerdctl on cgroup v2 hosts.

  2. Condition 2 (very rare): Add '/sys/fs/cgroup' to the 'maskedPaths' configuration. This can be done by modifying the 'config.json' file and adding '/sys/fs/cgroup' to the 'maskedPaths' array.

Conclusion

In conclusion, the vulnerability in runc allows a container to gain write access to user-owned cgroup hierarchy /sys/fs/cgroup/user.slice/... on the host. This can potentially lead to unauthorized modification of cgroup settings and disruption of other containers or the host system. It is recommended to update runc to version 1.1.5 or later to fix this vulnerability. Users can also consider implementing the provided workarounds if updating is not immediately feasible. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for github.com/opencontainers/runc →

Share this vulnerability

FAQ

The vulnerability allows a container to gain write access to user-owned cgroup hierarchy /sys/fs/cgroup/user.slice/... on the host. This can potentially allow an attacker to modify the cgroup settings and disrupt the behavior of other containers or the host system.

The vulnerability affects runc versions 0 and below. It has been fixed in version 1.1.5.

No, only user-owned cgroup hierarchies are affected. Other users' hierarchies remain unaffected.

The recommended fix is to update runc to version 1.1.5 or later. Users can update their runc installation by following the standard update process for their operating system or container runtime.

Yes, there are two possible workarounds:

  1. Unshare the cgroup namespace by executing runc with the '--cgroupns=private' flag.
  2. Add '/sys/fs/cgroup' to the 'maskedPaths' configuration.

Related vulnerabilities

Recent vulnerabilities recorded for github.com/opencontainers/runc.

How To Fix

Latest published version: v1.5.2 as of 22 Oct 2026

go get github.com/opencontainers/runc@v1.5.2

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.1.5

This is the first release that contains the fix.

go get github.com/opencontainers/runc@v1.1.5

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback