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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | python-rencode | 1.0.6-2 | — |
| Debian 13 | python-rencode | 1.0.6-2 | — |
| Debian 12 | python-rencode | 1.0.6-2 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 22.04 LTS | python-rencode | No fix yet | — |
| Ubuntu 20.04 LTS | python-rencode | No fix yet | — |
| Ubuntu 18.04 LTS | python-rencode | No fix yet | — |
| Ubuntu 16.04 LTS | python-rencode | No fix yet | — |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | py3-rencode | 1.0.6-r7 | — |
| Alpine v3.23 | py3-rencode | 1.0.6-r7 | — |
| Alpine v3.22 | py3-rencode | 1.0.6-r7 | — |
| Alpine v3.21 | py3-rencode | 1.0.6-r7 | — |
| Alpine v3.20 | py3-rencode | 1.0.6-r7 | — |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | py3-rencode | 1.0.6-r7 | — |
| Alpine v3.18 | py3-rencode | 1.0.6-r7 | — |
| Alpine v3.17 | py3-rencode | 1.0.6-r7 | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 1 repository
-
itlabbet/CVE-2021-40839 ★ 1 · Dec 13, 2021
Dirty Cow kernel exploit without libcrypt dependency
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | rencode | <= 1.0.6 | — | GHSA-gh8j-2pgf-x458 |
| PyPI | rencode | all versions | — | PYSEC-2021-345 |
References
- https://github.com/aresch/rencode/pull/29
- https://seclists.org/fulldisclosure/2021/Sep/16
- https://github.com/aresch/rencode/commit/572ff74586d9b1daab904c6f7f7009ce0143bb75
- https://pypi.org/project/rencode/#history
- https://security.netapp.com/advisory/ntap-20211008-0001/
- FEDORA-2022-02340931ec vendor-advisory
- FEDORA-2022-1033a2718b vendor-advisory