Skip to content
OpenAdvisories
High · 7.5 Public exploit CVE-2021-40839 EUVD-2021-0222GHSA-gh8j-2pgf-x458PYSEC-2021-345

Infinite Loop in rencode

Published Sep 10, 2021 · Updated Aug 4, 2024 · Assigned by mitre

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.

ReleasePackageFixed inAdvisory
Debian 14 python-rencode 1.0.6-2 —
Debian 13 python-rencode 1.0.6-2 —
Debian 12 python-rencode 1.0.6-2 —
ReleasePackageFixed inAdvisory
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 —
ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
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.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI rencode <= 1.0.6 — GHSA-gh8j-2pgf-x458
PyPI rencode all versions — PYSEC-2021-345

References