{"id":"UBUNTU-CVE-2021-40839","details":"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.","modified":"2025-10-24T04:50:34Z","published":"2021-09-10T02:15:00Z","upstream":["CVE-2021-40839"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2021-40839"},{"type":"REPORT","url":"https://github.com/aresch/rencode/commit/572ff74586d9b1daab904c6f7f7009ce0143bb75"},{"type":"REPORT","url":"https://github.com/aresch/rencode/pull/29"},{"type":"REPORT","url":"https://pypi.org/project/rencode/#history"},{"type":"REPORT","url":"https://seclists.org/fulldisclosure/2021/Sep/16"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2021-40839"}],"affected":[{"package":{"name":"python-rencode","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/python-rencode@1.0.3-1build2?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.3-1build1","1.0.3-1build2"],"ecosystem_specific":{"binaries":[{"binary_name":"python-rencode","binary_version":"1.0.3-1build2"},{"binary_name":"python3-rencode","binary_version":"1.0.3-1build2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-40839.json"}},{"package":{"name":"python-rencode","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/python-rencode@1.0.5-1build2?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.5-1build2"],"ecosystem_specific":{"binaries":[{"binary_name":"python-rencode","binary_version":"1.0.5-1build2"},{"binary_name":"python3-rencode","binary_version":"1.0.5-1build2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-40839.json"}},{"package":{"name":"python-rencode","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/python-rencode@1.0.6-1build1?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.5-1build4","1.0.5-1build5","1.0.5-1.1","1.0.6-1","1.0.6-1build1"],"ecosystem_specific":{"binaries":[{"binary_name":"python3-rencode","binary_version":"1.0.6-1build1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-40839.json"}},{"package":{"name":"python-rencode","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/python-rencode@1.0.6-2build1?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.6-1build3","1.0.6-2","1.0.6-2build1"],"ecosystem_specific":{"binaries":[{"binary_version":"1.0.6-2build1","binary_name":"python3-rencode"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-40839.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"},{"type":"Ubuntu","score":"medium"}]}