CVE-2021-40839 Infinite Loop in rencode
A remote attacker can cause a denial of service by triggering an infinite loop in the rencode Python library's typecode decoding.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-40839?
CVE-2021-40839 is a high-severity denial of service vulnerability in Fedoraproject Fedora, published on 10 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
The rencode package through 1.0.6 for Python allows an infinite loop in typecode decoding (such as via ;\x2f\x7f), enabling a remote attack that consumes CPU and memory.
Weakness: CWE-835
Which versions are affected by CVE-2021-40839?
3 open source packages ship an affected version, including rencode. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
rencode PyPI | All versions | None |
rencode PyPI | All versions to 1.0.6 | None |
rencode PyPI | All versions to 1.0.6 | None |
Products include Fedoraproject Fedora, Rencode Project Rencode.
How do I fix CVE-2021-40839?
Upgrade to a fixed version.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2021-40839 being exploited?
There is no known exploitation of CVE-2021-40839 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Other vulnerabilities in Fedoraproject Fedora
Sources
Also known as DEBIAN-CVE-2021-40839, GHSA-gh8j-2pgf-x458, MGASA-2022-0167, PYSEC-2021-345, UBUNTU-CVE-2021-40839.