# CVE-2022-27650: Privilege escalation in crun

> Attackers with access to programs with inheritable file capabilities can elevate privileges within containers due to incorrect default permission handling in crun and Docker.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 4 Apr 2022
- **Updated:** 3 Aug 2024
- **Also known as:** ALSA-2022:1793, CLEANSTART-2024-YM37206, DEBIAN-CVE-2022-27650, GHSA-wr4f-w546-m398, MGASA-2022-0141, RHSA-2022:1793, RLSA-2022:1793, UBUNTU-CVE-2022-27650, openSUSE-SU-2024:11989-1

## What is CVE-2022-27650?

CVE-2022-27650 is a high-severity vulnerability in Fedoraproject Fedora, published on 4 Apr 2022. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

A flaw was found in crun where containers were incorrectly started with non-empty default permissions. A vulnerability was found in Moby (Docker Engine) where containers were started incorrectly with non-empty inheritable Linux process capabilities. This flaw allows an attacker with access to programs with inheritable file capabilities to elevate those capabilities to the permitted set when execve(2) runs.

Weakness: CWE-276 (Incorrect Default Permissions)

## Which versions are affected by CVE-2022-27650?

It affects 4 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `buildah` | AlmaLinux:8 | All versions | 1.19.9-3.module_el8.6.0+2876+9ed4eae2 |
| `buildah-tests` | AlmaLinux:8 | All versions | 1.19.9-3.module_el8.6.0+2876+9ed4eae2 |
| `cockpit-podman` | AlmaLinux:8 | All versions | 29-2.module_el8.6.0+2876+9ed4eae2 |
| `conmon` | AlmaLinux:8 | All versions | 2:2.0.26-1.module_el8.6.0+2876+9ed4eae2 |
| `container-selinux` | AlmaLinux:8 | All versions | 2:2.178.0-2.module_el8.6.0+2876+9ed4eae2 |
| `containernetworking-plugins` | AlmaLinux:8 | All versions | 0.9.1-1.module_el8.6.0+2876+9ed4eae2 |
| `containers-common` | AlmaLinux:8 | All versions | 1:1.2.4-1.module_el8.6.0+2876+9ed4eae2 |
| `crit` | AlmaLinux:8 | All versions | 3.15-1.module_el8.6.0+2876+9ed4eae2 |
| `criu` | AlmaLinux:8 | All versions | 3.15-1.module_el8.6.0+2876+9ed4eae2 |
| `crun` | AlmaLinux:8 | All versions | 0.18-3.module_el8.6.0+2876+9ed4eae2 |
| `fuse-overlayfs` | AlmaLinux:8 | All versions | 1.4.0-2.module_el8.6.0+2876+9ed4eae2 |
| `libslirp` | AlmaLinux:8 | All versions | 4.3.1-1.module_el8.6.0+2876+9ed4eae2 |
| `libslirp-devel` | AlmaLinux:8 | All versions | 4.3.1-1.module_el8.6.0+2876+9ed4eae2 |
| `oci-seccomp-bpf-hook` | AlmaLinux:8 | All versions | 1.2.0-3.module_el8.6.0+2876+9ed4eae2 |
| `podman` | AlmaLinux:8 | All versions | 3.0.1-8.module_el8.6.0+2876+9ed4eae2 |
| `podman-catatonit` | AlmaLinux:8 | All versions | 3.0.1-8.module_el8.6.0+2876+9ed4eae2 |
| `podman-docker` | AlmaLinux:8 | All versions | 3.0.1-8.module_el8.6.0+2876+9ed4eae2 |
| `podman-plugins` | AlmaLinux:8 | All versions | 3.0.1-8.module_el8.6.0+2876+9ed4eae2 |
| `podman-remote` | AlmaLinux:8 | All versions | 3.0.1-8.module_el8.6.0+2876+9ed4eae2 |
| `podman-tests` | AlmaLinux:8 | All versions | 3.0.1-8.module_el8.6.0+2876+9ed4eae2 |
| `python3-criu` | AlmaLinux:8 | All versions | 3.15-1.module_el8.6.0+2876+9ed4eae2 |
| `runc` | AlmaLinux:8 | All versions | 1.0.0-73.rc95.module_el8.6.0+2876+9ed4eae2 |
| `skopeo` | AlmaLinux:8 | All versions | 1:1.2.4-1.module_el8.6.0+2876+9ed4eae2 |
| `skopeo-tests` | AlmaLinux:8 | All versions | 1:1.2.4-1.module_el8.6.0+2876+9ed4eae2 |
| `slirp4netns` | AlmaLinux:8 | All versions | 1.1.8-1.module_el8.6.0+2876+9ed4eae2 |
| `toolbox` | AlmaLinux:8 | All versions | 0.0.99.3-1.module_el8.6.0+2876+9ed4eae2 |
| `toolbox-tests` | AlmaLinux:8 | All versions | 0.0.99.3-1.module_el8.6.0+2876+9ed4eae2 |
| `udica` | AlmaLinux:8 | All versions | 0.2.4-1.module_el8.6.0+2876+9ed4eae2 |
| `buildah` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.19.9-3.module+el8.6.0+14694+4f5132e0 |
| `buildah-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.19.9-3.module+el8.6.0+14694+4f5132e0 |
| `buildah-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.19.9-3.module+el8.6.0+14694+4f5132e0 |
| `buildah-tests` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.19.9-3.module+el8.6.0+14694+4f5132e0 |
| `buildah-tests-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.19.9-3.module+el8.6.0+14694+4f5132e0 |
| `cockpit-podman` | Red Hat:enterprise_linux:8::appstream | All versions | 0:29-2.module+el8.6.0+14694+4f5132e0 |
| `conmon` | Red Hat:enterprise_linux:8::appstream | All versions | 2:2.0.26-1.module+el8.6.0+14694+4f5132e0 |
| `conmon-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 2:2.0.26-1.module+el8.6.0+14694+4f5132e0 |
| `conmon-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 2:2.0.26-1.module+el8.6.0+14694+4f5132e0 |
| `container-selinux` | Red Hat:enterprise_linux:8::appstream | All versions | 2:2.178.0-2.module+el8.6.0+14694+4f5132e0 |
| `containernetworking-plugins` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.9.1-1.module+el8.6.0+14694+4f5132e0 |
| `containernetworking-plugins-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.9.1-1.module+el8.6.0+14694+4f5132e0 |

Products: Crun Project Crun, Fedoraproject Fedora, Redhat Enterprise Linux, Redhat Openshift Container Platform.

## How do I fix CVE-2022-27650?

Apply the vendor's patch.

## Is CVE-2022-27650 being exploited?

There is no known exploitation of CVE-2022-27650 in the wild and no public exploit code.

## Other vulnerabilities in Fedoraproject Fedora

- [CVE-2019-18837](https://insights.sbomify.com/CVE-2019-18837/): An issue was discovered in crun before 0.10.5. (high 8.6)
- [CVE-2026-30892](https://insights.sbomify.com/CVE-2026-30892/): Crun incorrectly parses `crun exec` option `-u`, leading to privilege escalation (not scored)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-27650 and fix it if it is affected.

What it is: CVE-2022-27650 is a high-severity vulnerability in Fedoraproject Fedora, published on 4 Apr 2022. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2022-27650 in the wild and no public exploit code.

Affected product: Fedoraproject Fedora. No package-level version data is available, so check the vendor advisory linked from the reference page.

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-2022-27650/ (Markdown: https://insights.sbomify.com/CVE-2022-27650/index.md)
```

## Sources

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

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