runc container escape and denial of service due to arbitrary write gadgets and procfs write redirects
CVE-2025-52881 · GHSA-cgrx-mc8f-2prm
- Affected
- Go github.com/opencontainers/selinux <= 1.12.0
- Fixed in
- 1.13.0· Vendor fix available
- Issue
- Impact This attack is primarily a more sophisticated version of CVE-2019-19921, which was a flaw which allowed an attacker to trick runc into writing the LSM process labels for a container process into a dummy tmpfs file and thus not apply the correct LSM labels to the container process. The mitigation runc applied for CVE-2019-19921 was fairly limited and effectively only caused runc to verify that when runc writes LSM labels that those labels are actual procfs files. Rather than using a fake tmpfs file for /proc/self/attr/<label, an attacker could instead (through various means) make /proc/self/attr/<label reference a real procfs file, but one that would still be a no-op (such as /proc/self/sched). This would have the same effect but would clear the "is a procfs file" check. Runc is aware that this kind of attack would be possible (even going so far as to discuss this publicly as "future work" at conferences), and runc is working on a far more comprehensive mitigation of this…
Recommended action: Upgrade to 1.13.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.