{"id":"CVE-2021-40839","aliases":["CVE-2021-40839","GHSA-gh8j-2pgf-x458","PYSEC-2021-345"],"related":[],"kind":"vulnerability","state":"published","title":"Infinite Loop in rencode","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"El paquete rencode versiones hasta 1.0.6 para Python, permite un bucle infinito en la decodificación de typecode (como por medio de ;x2f\\x7f), permitiendo un ataque remoto que consume CPU y memoria","source":"nvd"}],"published":"2021-09-10T01:03:33.000Z","modified":"2026-06-17T04:07:30.927Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","score":5,"rating":"MEDIUM"}],"cwes":["CWE-835"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"1.0.6"}],"ecosystem":"PyPI","package":"rencode","purl":"pkg:pypi/rencode","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"1.0.6"}],"vendor":"rencode_project","product":"rencode","cpe":"cpe:2.3:a:rencode_project:rencode:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"34"},{"status":"affected","version":"35"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"572ff74586d9b1daab904c6f7f7009ce0143bb75"},{"type":"ecosystem","introduced":"0","status":"affected"}],"ecosystem":"PyPI","package":"rencode","purl":"pkg:pypi/rencode","repo":"https://github.com/aresch/rencode","source":"pysec"}],"references":[{"url":"https://github.com/aresch/rencode/pull/29","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://seclists.org/fulldisclosure/2021/Sep/16","tags":["mailing-list","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/aresch/rencode/commit/572ff74586d9b1daab904c6f7f7009ce0143bb75","tags":["fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://pypi.org/project/rencode/#history","tags":["package","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://security.netapp.com/advisory/ntap-20211008-0001/","tags":["third-party-advisory","x-refsource-confirm","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BMVQRPDVSVZNGGX57CFKCYT3DEYO4QB6/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MCLETLGVM5DBX6QNHQFW6TWGO5T3DENY/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-40839","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-gh8j-2pgf-x458","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/aresch/rencode","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/rencode/PYSEC-2021-345.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BMVQRPDVSVZNGGX57CFKCYT3DEYO4QB6","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MCLETLGVM5DBX6QNHQFW6TWGO5T3DENY","tags":["web"],"sources":["ghsa"]},{"url":"https://security.netapp.com/advisory/ntap-20211008-0001","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-40839","url":"https://www.cve.org/CVERecord?id=CVE-2021-40839","licence":"CVE Terms of Use","modified":"2024-08-04T02:51:07.399Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-gh8j-2pgf-x458","url":"https://github.com/advisories/GHSA-gh8j-2pgf-x458","licence":"CC-BY-4.0","modified":"2024-10-26T18:49:27.328Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-40839","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-40839","licence":"Public domain","modified":"2026-06-17T04:07:30.927Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2021-345","url":"https://osv.dev/vulnerability/PYSEC-2021-345","licence":"CC-BY-4.0","modified":"2025-10-09T07:29:23.400Z"}],"updatedAt":"2026-11-25T22:58:03.877Z","epss":{"score":0.0552,"percentile":0.92977,"date":"2026-12-01T12:00:22.000Z"}}