# CVE-2021-20199: Podman Origin Validation Error

> Podman rootless containers spoof localhost IPs, allowing attackers to bypass authentication in applications trusting local connections.

- **Severity:** Medium 5.9 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 2 Feb 2021
- **Updated:** 3 Aug 2024
- **Also known as:** AZL-7329, DEBIAN-CVE-2021-20199, GHSA-grh6-q6m2-rh72, UBUNTU-CVE-2021-20199

## What is CVE-2021-20199?

CVE-2021-20199 is a medium-severity authentication bypass vulnerability in podman, published on 2 Feb 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Rootless containers run with Podman, receive all traffic with a source IP address of 127.0.0.1 (including from remote hosts). This impacts containerized applications that trust localhost (127.0.01) connections by default and do not require authentication. This issue affects Podman 1.8.0 onwards.

Weakness: CWE-346 (Origin Validation Error)

## Which versions are affected by CVE-2021-20199?

2 open source packages ship an affected version, including github.com/containers/podman/v3. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/containers/podman/v3` | Go | All versions | 3.0.0 |
| `github.com/containers/podman/v3` | Go | All versions | 3.0.0 |

Products: Podman Project Podman.

## How do I fix CVE-2021-20199?

Upgrade github.com/containers/podman/v3 to 3.0.0 or later.

## Is CVE-2021-20199 being exploited?

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

## Other vulnerabilities in podman

- [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-2738](https://insights.sbomify.com/CVE-2022-2738/): Use after free in podman (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)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-20199 and fix it if it is affected.

What it is: CVE-2021-20199 is a medium-severity authentication bypass vulnerability in podman, published on 2 Feb 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2021-20199 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/containers/podman/v3 (Go): affected all versions; fixed in 3.0.0
- github.com/containers/podman/v3 (Go): affected all versions; fixed in 3.0.0

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

## Sources

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

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