CVE-2022-27651: Non-empty default inheritable capabilities for linux container in Buildah
6.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.2861%
CWE
Published
4/1/2022
Updated
2/14/2023
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
github.com/containers/buildah | go | < 1.25.0 | 1.25.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from improper handling of Linux capabilities in two key areas:
- In chroot/run.go, setCapabilities() populated inheritable capabilities from the spec rather than enforcing an empty default.
- In run_linux.go, setupCapAdd()/setupCapDrop() directly manipulated inheritable capabilities when adding/dropping privileges. The fix in commit e7e55c9 explicitly sets inheritable to empty in setCapabilities and removes inheritable capability modifications from setupCapAdd/setupCapDrop, confirming these functions' involvement. The Go vulnerability report (GO-2022-0417) and CVE description both align with these being the vulnerable code paths.