# CVE-2022-2738: Use after free in podman

> A regression in Podman reintroduced a use-after-free flaw in GPG signature verification, potentially allowing code execution or crashes.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 1 Sep 2022
- **Updated:** 3 Aug 2024
- **Also known as:** GHSA-8pqv-rxj7-35c4

## What is CVE-2022-2738?

CVE-2022-2738 is a high-severity use after free vulnerability in Redhat Enterprise Linux Server, published on 1 Sep 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

The version of podman as released for Red Hat Enterprise Linux 7 Extras via RHSA-2022:2190 advisory included an incorrect version of podman missing the fix for CVE-2020-8945, which was previously fixed via RHSA-2020:2117. This issue could possibly be used to crash or cause potential code execution in Go applications that use the Go GPGME wrapper library, under certain conditions, during GPG signature verification.

Weakness: CWE-416 (Use After Free)

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

It affects 3 products.


Products: Podman Project Podman, Redhat Enterprise Linux Server, Redhat Enterprise Linux Workstation.

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

Apply the vendor's patch.

## Is CVE-2022-2738 being exploited?

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

## Other vulnerabilities in Redhat Enterprise Linux Server

- [CVE-2026-57231](https://insights.sbomify.com/CVE-2026-57231/): Podman: Malformed Image can trick podman run into leaking host environment variables into the container (high 7.5)
- [CVE-2022-2989](https://insights.sbomify.com/CVE-2022-2989/): Podman's incorrect handling of the supplementary groups may lead to data disclosure, modification (high 7.1)
- [CVE-2021-20188](https://insights.sbomify.com/CVE-2021-20188/): Improper Authorization in github.com/containers/libpod (high 7.0)
- [CVE-2023-0778](https://insights.sbomify.com/CVE-2023-0778/): Podman Time-of-check Time-of-use (TOCTOU) Race Condition (medium 6.8)
- [CVE-2019-25067](https://insights.sbomify.com/CVE-2019-25067/): Podman/Varlink API Privilege Escalation (medium 6.3)

## Fix prompt for AI coding agents

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

What it is: CVE-2022-2738 is a high-severity use after free vulnerability in Redhat Enterprise Linux Server, published on 1 Sep 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2022-2738 in the wild and no public exploit code.

Affected product: Redhat Enterprise Linux Server. 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-2738/ (Markdown: https://insights.sbomify.com/CVE-2022-2738/index.md)
```

## Sources

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

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