# CVE-2022-2990: Buildah's incorrect handling of the supplementary groups may lead to data disclosure, modification

> Attackers with code execution in a Buildah container can bypass supplementary group permissions to read or modify sensitive data.

- **Severity:** High 7.1 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 13 Sep 2022
- **Updated:** 3 Aug 2024
- **Also known as:** AZL-10960, AZL-36935, CLEANSTART-2024-MV49832, DEBIAN-CVE-2022-2990, GHSA-fjm8-m7m6-2fjp, GO-2022-1008, SUSE-SU-2023:4099-1, UBUNTU-CVE-2022-2990, openSUSE-SU-2024:12289-1

## What is CVE-2022-2990?

CVE-2022-2990 is a high-severity missing authorization vulnerability in Redhat Enterprise Linux, published on 13 Sep 2022. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

An incorrect handling of the supplementary groups in the Buildah container engine might lead to the sensitive information disclosure or possible data modification if an attacker has direct access to the affected container where supplementary groups are used to set access permissions and is able to execute a binary code in that container.

Weakness: CWE-863 (Incorrect Authorization), CWE-842 (Placement of User into Incorrect Group)

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

3 open source packages ship an affected version, including github.com/containers/buildah. It affects 3 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/containers/buildah` | Go | All versions | 1.27.1 |
| `github.com/containers/buildah` | Go | All versions | 1.27.1 |
| `github.com/containers/buildah` | Go | All versions | 1.27.1 |
| `buildah` | SUSE:Enterprise Storage 7 | All versions | 1.25.1-150100.3.20.15 |
| `buildah` | SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 1.25.1-150100.3.20.15 |
| `buildah` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 1.25.1-150100.3.20.15 |
| `buildah` | SUSE:Linux Enterprise Server 15 SP1-LTSS | All versions | 1.25.1-150100.3.20.15 |
| `buildah` | SUSE:Linux Enterprise Server 15 SP2-LTSS | All versions | 1.25.1-150100.3.20.15 |
| `buildah` | SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | All versions | 1.25.1-150100.3.20.15 |
| `buildah` | SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | All versions | 1.25.1-150100.3.20.15 |
| `buildah` | openSUSE:Tumbleweed | All versions | 1.27.0-3.1 |

Products: Buildah Project Buildah, Redhat Enterprise Linux, Redhat Openshift Container Platform.

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

Upgrade github.com/containers/buildah to 1.27.1 or later.

## Is CVE-2022-2990 being exploited?

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

## Other vulnerabilities in Redhat Enterprise Linux

- [CVE-2020-10696](https://insights.sbomify.com/CVE-2020-10696/): Path Traversal in Buildah (high 8.8)
- [CVE-2024-9675](https://insights.sbomify.com/CVE-2024-9675/): Buildah: buildah allows arbitrary directory mount (high 7.8)
- [CVE-2022-27651](https://insights.sbomify.com/CVE-2022-27651/): Non-empty default inheritable capabilities for linux container in Buildah (medium 6.8)
- [CVE-2019-10214](https://insights.sbomify.com/CVE-2019-10214/): containers/image library Insufficiently Protects Credentials (medium 6.4)
- [CVE-2021-3602](https://insights.sbomify.com/CVE-2021-3602/): Buildah processes using chroot isolation may leak environment values to intermediate processes (medium 5.5)

## Fix prompt for AI coding agents

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

What it is: CVE-2022-2990 is a high-severity missing authorization vulnerability in Redhat Enterprise Linux, published on 13 Sep 2022. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2022-2990 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/containers/buildah (Go): affected all versions; fixed in 1.27.1
- github.com/containers/buildah (Go): affected all versions; fixed in 1.27.1
- github.com/containers/buildah (Go): affected all versions; fixed in 1.27.1

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

## Sources

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

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