In-container privilege gain via inherited Linux capabilities
Published Apr 4, 2022 · Updated Aug 3, 2024
Incorrect default permissions in Buildah before 1.25.0 allow local users to gain Linux process capabilities via capable executables. The run_linux.go capability setup adds requested capabilities to the inheritable set, while chroot/run.go copies the OCI specification's inheritable set into the child instead of clearing it. Exploitation requires code execution inside a container containing an executable with inheritable file capabilities; gains remain bounded by the container capability bounding set and do not escape the sandbox.
Summary
What happened
Incorrect default permissions in Buildah before 1.25.0 allow local users to gain Linux process capabilities via capable executables. The run_linux.go capability setup adds requested capabilities to the inheritable set, while chroot/run.go copies the OCI specification's inheritable set into the child instead of clearing it. Exploitation requires code execution inside a container containing an executable with inheritable file capabilities; gains remain bounded by the container capability bounding set and do not escape the sandbox.
The record
- CVE
- CVE-2022-27651
- Published
- Apr 4, 2022
- Updated
- Aug 3, 2024
- Vendor
- Containers
- Product
- Buildah
- Classifications
- CWE-276, T1548
- Attack vector
- local
- Privileges
- Unavailable
Timeline
How it unfolded
- Apr 4, 2022CVE publishedPublication date reported by the CVE source.
- Aug 3, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=Affects buildah v1.24.0 and prior, Fixed in - v1.25.0
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo