# CVE-2021-3737: Denial of service in python

> A remote attacker controlling an HTTP server can cause Python client scripts to enter an infinite loop, consuming CPU resources and causing denial of service.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 4 Mar 2022
- **Updated:** 14 Oct 2026
- **Also known as:** BIT-libpython-2021-3737, BIT-python-2021-3737, BIT-python-min-2021-3737, CLSA-2022-1647958513, CLSA-2022-1647958678, CLSA-2022-1647969910, CLSA-2022-1648048535, CLSA-2023-1689701064, DEBIAN-CVE-2021-3737, GHSA-hr7v-m862-8hh8, PSF-2022-7, UBUNTU-CVE-2021-3737, USN-5201-1

## What is CVE-2021-3737?

CVE-2021-3737 is a high-severity denial of service vulnerability in Canonical Ubuntu Linux, published on 4 Mar 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

A flaw was found in python. An improperly handled HTTP response in the HTTP client code of python may allow a remote attacker, who controls the HTTP server, to make the client script enter an infinite loop, consuming CPU time. The highest threat from this vulnerability is to system availability.

Weakness: CWE-400 (Uncontrolled Resource Consumption), CWE-835 (Loop with Unreachable Exit Condition)

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

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `libpython` | Bitnami | From 3.6.0 | 3.6.14, 3.7.11, 3.8.11, 3.9.6 |
| `python` | Bitnami | From 3.6.0 | 3.6.14, 3.7.11, 3.8.11, 3.9.6 |
| `python-min` | Bitnami | From 3.6.0 | 3.6.14, 3.7.11, 3.8.11, 3.9.6 |

Products: Canonical Ubuntu Linux, Fedoraproject Fedora, Netapp Hci, Netapp Management Services for Element Software, Netapp Netapp Xcp Smb, Netapp Ontap Select Deploy Administration Utility, Netapp Xcp Nfs, Oracle Communications Cloud Native Core Binding Support Function, Oracle Communications Cloud Native Core Network Exposure Function, Oracle Communications Cloud Native Core Policy, Python Python, Redhat Codeready Linux Builder, Redhat Codeready Linux Builder for Ibm Z Systems, Redhat Codeready Linux Builder for Power Little Endian, Redhat Enterprise Linux, Redhat Enterprise Linux for Ibm Z Systems, Redhat Enterprise Linux for Power Little Endian.

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

Upgrade libpython to a fixed version for your release line: 3.6.14, 3.7.11, 3.8.11 or 3.9.6.

## Is CVE-2021-3737 being exploited?

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

## Other vulnerabilities in Canonical Ubuntu Linux

- [CVE-2020-11651](https://insights.sbomify.com/CVE-2020-11651/): SaltStack Salt Authentication Bypass (critical 9.8, exploited in the wild)
- [CVE-2020-7247](https://insights.sbomify.com/CVE-2020-7247/): OpenSMTPD Remote Code Execution (critical 9.8, exploited in the wild)
- [CVE-2019-16928](https://insights.sbomify.com/CVE-2019-16928/): Exim Out-of-bounds Write (critical 9.8, exploited in the wild)
- [CVE-2018-6789](https://insights.sbomify.com/CVE-2018-6789/): Exim Buffer Overflow (critical 9.8, exploited in the wild)
- [CVE-2015-2590](https://insights.sbomify.com/CVE-2015-2590/): Oracle Java SE and Java SE Embedded Remote Code Execution (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

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

What it is: CVE-2021-3737 is a high-severity denial of service vulnerability in Canonical Ubuntu Linux, published on 4 Mar 2022. 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-3737 in the wild and no public exploit code.

Affected packages and fixed versions:
- libpython (Bitnami): affected from 3.6.0; fixed in 3.6.14, 3.7.11, 3.8.11, 3.9.6
- python (Bitnami): affected from 3.6.0; fixed in 3.6.14, 3.7.11, 3.8.11, 3.9.6
- python-min (Bitnami): affected from 3.6.0; fixed in 3.6.14, 3.7.11, 3.8.11, 3.9.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-3737/ (Markdown: https://insights.sbomify.com/CVE-2021-3737/index.md)
```

## Sources

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

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