Every CVESearch/Get API key

CVE-2021-40839

Infinite Loop in rencode

7.5 HighPublic exploitFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

5.52%Up 4.5 points since Sep 10, 2021
90%50%10%1%

What each source reports

NVD Score used7.5

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.

Record
CVE-2021-40839
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.0
5.0 MediumAV:N/AC:L/Au:N/C:N/I:N/A:P
Weakness
CWE-835
Updated
2026-11-02
CVE ListNo score

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.

Record
CVE-2021-40839
Updated
2026-11-02
EUVDEUVD-2021-0222No score

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.

Record
EUVD-2021-0222
Updated
2026-11-03
GitHub AdvisoriesGHSA-gh8j-2pgf-x4588.7

Infinite Loop in rencode

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.

Record
GHSA-gh8j-2pgf-x458
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-835
Updated
2026-11-02
OSVALPINE-CVE-2021-408397.5

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.

Record
ALPINE-CVE-2021-40839
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-03
OSV7.5

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.

Record
CVE-2021-40839
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
Show 5 moreShow less
OSVDEBIAN-CVE-2021-408397.5

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.

Record
DEBIAN-CVE-2021-40839
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVGHSA-gh8j-2pgf-x4588.7

Infinite Loop in rencode

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.

Record
GHSA-gh8j-2pgf-x458
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-835
Updated
2026-11-02
OSVUBUNTU-CVE-2021-408397.5

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.

Record
UBUNTU-CVE-2021-40839
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVMGASA-2022-0167No score

Updated python-rencode packages fix security vulnerability

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. (CVE-2021-40839)

Record
MGASA-2022-0167
Updated
2026-11-02
OSVPYSEC-2021-345No score

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.

Record
PYSEC-2021-345
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
rencode
PyPI
through 1.0.6None known
py3-rencode
Alpine:v3.17
before 1.0.6-r7
1.0.6-r7
py3-rencode
Alpine:v3.18
before 1.0.6-r7
1.0.6-r7
py3-rencode
Alpine:v3.19
before 1.0.6-r7
1.0.6-r7
py3-rencode
Alpine:v3.20
before 1.0.6-r7
1.0.6-r7
py3-rencode
Alpine:v3.21
before 1.0.6-r7
1.0.6-r7
py3-rencode
Alpine:v3.22
before 1.0.6-r7
1.0.6-r7
py3-rencode
Alpine:v3.23
before 1.0.6-r7
1.0.6-r7
py3-rencode
Alpine:v3.24
before 1.0.6-r7
1.0.6-r7
python-rencode
Debian:12
before 1.0.6-2
1.0.6-2
Show 9 moreShow less
Affected packages
PackageAffectedFixed
python-rencode
Debian:13
before 1.0.6-2
1.0.6-2
python-rencode
Debian:14
before 1.0.6-2
1.0.6-2
rencode
PyPI
through 1.0.6, plus listed versions
1.0.31.0.41.0.5
None known
python-rencode
Mageia:8
before 1.0.6-2.1.mga8
1.0.6-2.1.mga8
rencode
PyPI
All versions, plus listed versions
1.0.31.0.41.0.51.0.61.0.71.0.8
None known
python-rencode
Ubuntu:16.04:LTS
All versions, plus listed versions
1.0.3-1build11.0.3-1build2
None known
python-rencode
Ubuntu:18.04:LTS
All versions, plus listed versions
1.0.5-1build2
None known
python-rencode
Ubuntu:20.04:LTS
All versions, plus listed versions
1.0.5-1build41.0.5-1build51.0.5-1.11.0.6-11.0.6-1build1
None known
python-rencode
Ubuntu:22.04:LTS
All versions, plus listed versions
1.0.6-1build31.0.6-21.0.6-2build1
None known

Public exploits

Links only. Every CVE stores no exploit code.

Public exploits
SourceLinkDate
PoC in GitHubitlabbet/CVE-2021-408392021-12-13

History

History
RecordedChangedSources
affected, aliases, referencesOSV
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV, PoC in GitHub

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-40839 is a high vulnerability (CVSS 7.5) in Rencode Project Rencode, published September 10, 2021. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 5.52%, the 92nd percentile. Fixed in py3-rencode 1.0.6-r7.

References

Show 14 moreShow less
MoveEnter Open