# CVE-2021-28861: Open redirect in n/a

> An open redirect in Python's http.server module allows attackers to redirect users to malicious sites, potentially leading to information disclosure.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`)
- **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:** 23 Aug 2022
- **Updated:** 14 Oct 2026
- **Also known as:** AZL-10618, BIT-libpython-2021-28861, BIT-python-2021-28861, BIT-python-min-2021-28861, CLSA-2022-1663183291, CLSA-2022-1663184139, CLSA-2022-1663184406, CLSA-2023-1689259392, DEBIAN-CVE-2021-28861, GHSA-h7f6-hc46-frrv, OESA-2022-1879, PSF-2022-5, SUSE-SU-2022:3483-1, SUSE-SU-2022:3511-1, SUSE-SU-2022:3511-2, SUSE-SU-2022:3512-1, SUSE-SU-2022:3512-2, SUSE-SU-2022:3544-1, SUSE-SU-2022:3553-1, SUSE-SU-2022:3593-1, SUSE-SU-2022:3940-1, UBUNTU-CVE-2021-28861, USN-5629-1, openSUSE-SU-2024:12297-1, openSUSE-SU-2024:12300-1, openSUSE-SU-2024:12301-1, openSUSE-SU-2024:12321-1

## What is CVE-2021-28861?

CVE-2021-28861 is a medium-severity vulnerability in Fedoraproject Fedora, published on 23 Aug 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

Python 3.x through 3.10 has an open redirection vulnerability in lib/http/server.py due to no protection against multiple (/) at the beginning of URI path which may leads to information disclosure. NOTE: this is disputed by a third party because the http.server.html documentation page states "Warning: http.server is not recommended for production. It only implements basic security checks."

Weakness: CWE-601 (URL Redirection to Untrusted Site)

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

3 open source packages ship an affected version, including libpython, python and python-min. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `libpython` | Bitnami | From 3.0.0 | 3.7.14, 3.8.14, 3.9.14, 3.10.6 |
| `python` | Bitnami | From 3.0.0 | 3.7.14, 3.8.14, 3.9.14, 3.10.6 |
| `python-min` | Bitnami | From 3.0.0 | 3.7.14, 3.8.14, 3.9.14, 3.10.6 |
| `python` | SUSE:Enterprise Storage 6 | All versions | 2.7.18-150000.44.1 |
| `python-base` | SUSE:Enterprise Storage 6 | All versions | 2.7.18-150000.44.1 |
| `python3` | SUSE:Enterprise Storage 6 | All versions | 3.6.15-150000.3.109.1 |
| `python3-core` | SUSE:Enterprise Storage 6 | All versions | 3.6.15-150000.3.109.1 |
| `python` | SUSE:Enterprise Storage 7 | All versions | 2.7.18-150000.44.1 |
| `python-base` | SUSE:Enterprise Storage 7 | All versions | 2.7.18-150000.44.1 |
| `python3` | SUSE:Enterprise Storage 7 | All versions | 3.6.15-150000.3.109.1 |
| `python3-core` | SUSE:Enterprise Storage 7 | All versions | 3.6.15-150000.3.109.1 |
| `python` | SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS | All versions | 2.7.18-150000.44.1 |
| `python-base` | SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS | All versions | 2.7.18-150000.44.1 |
| `python3` | SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS | All versions | 3.6.15-150000.3.109.1 |
| `python3-core` | SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS | All versions | 3.6.15-150000.3.109.1 |
| `python` | SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 2.7.18-150000.44.1 |
| `python-base` | SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 2.7.18-150000.44.1 |
| `python3` | SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 3.6.15-150000.3.109.1 |
| `python3-core` | SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 3.6.15-150000.3.109.1 |
| `python` | SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS | All versions | 2.7.18-150000.44.1 |
| `python-base` | SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS | All versions | 2.7.18-150000.44.1 |
| `python3` | SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS | All versions | 3.6.15-150000.3.109.1 |
| `python3-core` | SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS | All versions | 3.6.15-150000.3.109.1 |
| `python` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 2.7.18-150000.44.1 |
| `python-base` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 2.7.18-150000.44.1 |
| `python3` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 3.6.15-150000.3.109.1 |
| `python3-core` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 3.6.15-150000.3.109.1 |
| `python` | SUSE:Linux Enterprise High Performance Computing 15-ESPOS | All versions | 2.7.18-150000.44.1 |
| `python-base` | SUSE:Linux Enterprise High Performance Computing 15-ESPOS | All versions | 2.7.18-150000.44.1 |
| `python3` | SUSE:Linux Enterprise High Performance Computing 15-ESPOS | All versions | 3.6.15-150000.3.109.1 |
| `python3-core` | SUSE:Linux Enterprise High Performance Computing 15-ESPOS | All versions | 3.6.15-150000.3.109.1 |
| `python` | SUSE:Linux Enterprise High Performance Computing 15-LTSS | All versions | 2.7.18-150000.44.1 |
| `python-base` | SUSE:Linux Enterprise High Performance Computing 15-LTSS | All versions | 2.7.18-150000.44.1 |
| `python3` | SUSE:Linux Enterprise High Performance Computing 15-LTSS | All versions | 3.6.15-150000.3.109.1 |
| `python3-core` | SUSE:Linux Enterprise High Performance Computing 15-LTSS | All versions | 3.6.15-150000.3.109.1 |
| `python3` | SUSE:Linux Enterprise Micro 5.1 | All versions | 3.6.15-150000.3.109.1 |
| `python3-core` | SUSE:Linux Enterprise Micro 5.1 | All versions | 3.6.15-150000.3.109.1 |
| `python3` | SUSE:Linux Enterprise Micro 5.2 | All versions | 3.6.15-150300.10.30.1 |
| `python3-core` | SUSE:Linux Enterprise Micro 5.2 | All versions | 3.6.15-150300.10.30.1 |
| `python3` | SUSE:Linux Enterprise Micro 5.3 | All versions | 3.6.15-150300.10.30.1 |

Products: Fedoraproject Fedora, Python Python.

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

Upgrade libpython to a fixed version for your release line: 3.7.14, 3.8.14, 3.9.14 or 3.10.6.

## Is CVE-2021-28861 being exploited?

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

## Other vulnerabilities in Fedoraproject Fedora

- [CVE-2024-4577](https://insights.sbomify.com/CVE-2024-4577/): PHP-CGI OS Command Injection (critical 9.8, exploited in the wild)
- [CVE-2021-39226](https://insights.sbomify.com/CVE-2021-39226/): Grafana Authentication Bypass (critical 9.8, exploited in the wild)
- [CVE-2019-5544](https://insights.sbomify.com/CVE-2019-5544/): VMware ESXi and Horizon DaaS OpenSLP Heap-Based Buffer Overflow (critical 9.8, exploited in the wild)
- [CVE-2024-4947](https://insights.sbomify.com/CVE-2024-4947/): Google Chromium V8 Type Confusion (critical 9.6, exploited in the wild)
- [CVE-2024-4671](https://insights.sbomify.com/CVE-2024-4671/): Google Chromium Visuals Use-After-Free (critical 9.6, exploited in the wild)

## Fix prompt for AI coding agents

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

What it is: CVE-2021-28861 is a medium-severity vulnerability in Fedoraproject Fedora, published on 23 Aug 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-2021-28861 in the wild and no public exploit code.

Affected packages and fixed versions:
- libpython (Bitnami): affected from 3.0.0; fixed in 3.7.14, 3.8.14, 3.9.14, 3.10.6
- python (Bitnami): affected from 3.0.0; fixed in 3.7.14, 3.8.14, 3.9.14, 3.10.6
- python-min (Bitnami): affected from 3.0.0; fixed in 3.7.14, 3.8.14, 3.9.14, 3.10.6

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

## Sources

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

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