{"id":"CVE-2021-40839","aliases":["ALPINE-CVE-2021-40839","DEBIAN-CVE-2021-40839","EUVD-2021-0222","GHSA-gh8j-2pgf-x458","MGASA-2022-0167","PYSEC-2021-345","UBUNTU-CVE-2021-40839"],"status":"published","title":"Infinite Loop in rencode","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.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-12","score":0.0552,"percentile":0.92917,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-835"],"published":"2021-09-10T01:03:33Z","modified":"2026-11-03T06:32:41Z","exploits":[{"source":"pocgithub","id":"itlabbet/CVE-2021-40839","title":"itlabbet/CVE-2021-40839","date":"2021-12-13","url":"https://github.com/itlabbet/CVE-2021-40839"}],"fixes":[{"ecosystem":"Alpine:v3.17","package":"py3-rencode","fixed_in":["1.0.6-r7"],"sources":["osv"]},{"ecosystem":"Alpine:v3.18","package":"py3-rencode","fixed_in":["1.0.6-r7"],"sources":["osv"]},{"ecosystem":"Alpine:v3.19","package":"py3-rencode","fixed_in":["1.0.6-r7"],"sources":["osv"]},{"ecosystem":"Alpine:v3.20","package":"py3-rencode","fixed_in":["1.0.6-r7"],"sources":["osv"]},{"ecosystem":"Alpine:v3.21","package":"py3-rencode","fixed_in":["1.0.6-r7"],"sources":["osv"]},{"ecosystem":"Alpine:v3.22","package":"py3-rencode","fixed_in":["1.0.6-r7"],"sources":["osv"]},{"ecosystem":"Alpine:v3.23","package":"py3-rencode","fixed_in":["1.0.6-r7"],"sources":["osv"]},{"ecosystem":"Alpine:v3.24","package":"py3-rencode","fixed_in":["1.0.6-r7"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"python-rencode","fixed_in":["1.0.6-2"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"python-rencode","fixed_in":["1.0.6-2"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"python-rencode","fixed_in":["1.0.6-2"],"sources":["osv"]},{"ecosystem":"Mageia:8","package":"python-rencode","fixed_in":["1.0.6-2.1.mga8"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"rencode","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"1.0.6"}]}]},{"source":"osv","ecosystem":"Alpine:v3.17","package":"py3-rencode","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.6-r7"}]}]},{"source":"osv","ecosystem":"Alpine:v3.18","package":"py3-rencode","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.6-r7"}]}]},{"source":"osv","ecosystem":"Alpine:v3.19","package":"py3-rencode","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.6-r7"}]}]},{"source":"osv","ecosystem":"Alpine:v3.20","package":"py3-rencode","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.6-r7"}]}]},{"source":"osv","ecosystem":"Alpine:v3.21","package":"py3-rencode","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.6-r7"}]}]},{"source":"osv","ecosystem":"Alpine:v3.22","package":"py3-rencode","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.6-r7"}]}]},{"source":"osv","ecosystem":"Alpine:v3.23","package":"py3-rencode","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.6-r7"}]}]},{"source":"osv","ecosystem":"Alpine:v3.24","package":"py3-rencode","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.6-r7"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"python-rencode","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.6-2"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"python-rencode","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.6-2"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"python-rencode","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.6-2"}]}]},{"source":"osv","ecosystem":"PyPI","package":"rencode","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"1.0.6"}]}],"versions":["1.0.3","1.0.4","1.0.5","1.0.6"]},{"source":"osv","ecosystem":"Mageia:8","package":"python-rencode","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.6-2.1.mga8"}]}]},{"source":"osv","ecosystem":"PyPI","package":"rencode","ranges":[{"type":"GIT","events":[{"introduced":"0"},{"fixed":"572ff74586d9b1daab904c6f7f7009ce0143bb75"}]},{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.3","1.0.4","1.0.5","1.0.6","1.0.7","1.0.8"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"python-rencode","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.3-1build1","1.0.3-1build2"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"python-rencode","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.5-1build2"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"python-rencode","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"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"python-rencode","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.6-1build3","1.0.6-2","1.0.6-2build1"]}],"products":[{"vendor":"fedoraproject","product":"fedora"},{"vendor":"rencode_project","product":"rencode"}],"references":[{"url":"https://github.com/aresch/rencode/pull/29","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web","report"]},{"url":"https://seclists.org/fulldisclosure/2021/Sep/16","tags":["x_refsource_MISC","x_transferred","Mailing List","Third Party Advisory","advisory","web","report"]},{"url":"https://github.com/aresch/rencode/commit/572ff74586d9b1daab904c6f7f7009ce0143bb75","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web","report"]},{"url":"https://pypi.org/project/rencode/#history","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web","package","report"]},{"url":"https://security.netapp.com/advisory/ntap-20211008-0001/","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BMVQRPDVSVZNGGX57CFKCYT3DEYO4QB6/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MCLETLGVM5DBX6QNHQFW6TWGO5T3DENY/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-40839","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-gh8j-2pgf-x458","tags":["advisory"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/rencode/PYSEC-2021-345.yaml","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BMVQRPDVSVZNGGX57CFKCYT3DEYO4QB6","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MCLETLGVM5DBX6QNHQFW6TWGO5T3DENY","tags":["web"]},{"url":"https://security.netapp.com/advisory/ntap-20211008-0001","tags":["web"]},{"url":"https://security.alpinelinux.org/vuln/CVE-2021-40839","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-40839","tags":["advisory"]},{"url":"https://github.com/aresch/rencode","tags":["package"]},{"url":"https://advisories.mageia.org/MGASA-2022-0167.html","tags":["advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=30051","tags":["report"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/thread/MCLETLGVM5DBX6QNHQFW6TWGO5T3DENY/","tags":["web"]},{"url":"https://ubuntu.com/security/CVE-2021-40839","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-40839","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2021-40839","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.","status":"published","published":"2021-09-10T01:03:33Z","modified":"2024-08-04T02:51:07.399Z","updated_at":"2026-11-02T14:33:01.495293Z"}],"euvd":[{"id":"EUVD-2021-0222","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.","status":"published","published":"2021-09-10T01:03:33Z","modified":"2024-08-04T02:51:07Z","updated_at":"2026-11-03T03:24:19.692229Z"}],"ghsa":[{"id":"GHSA-gh8j-2pgf-x458","title":"Infinite Loop in rencode","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.","status":"published","published":"2021-09-13T20:05:51Z","modified":"2024-10-26T18:35:21Z","cvss":[{"version":"4.0","score":8.7,"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","level":"high"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-835"],"updated_at":"2026-11-02T14:38:13.90937Z"}],"nvd":[{"id":"CVE-2021-40839","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.","status":"published","published":"2021-09-10T02:15:07.933Z","modified":"2026-06-17T04:07:30.927Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-835"],"updated_at":"2026-11-02T14:06:58.502206Z"}],"osv":[{"id":"ALPINE-CVE-2021-40839","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.","status":"published","published":"2021-09-10T02:15:07.933Z","modified":"2026-11-03T06:32:41.200147042Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-03T07:17:02.90744Z"},{"id":"CVE-2021-40839","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.","status":"published","published":"2021-09-10T02:15:07.933Z","modified":"2026-10-20T10:53:56.204211189Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:44:21.249056Z"},{"id":"DEBIAN-CVE-2021-40839","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.","status":"published","published":"2021-09-10T02:15:07.933Z","modified":"2026-10-23T18:03:38.623222567Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:35.521549Z"},{"id":"GHSA-gh8j-2pgf-x458","title":"Infinite Loop in rencode","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.","status":"published","published":"2021-09-13T20:05:51Z","modified":"2024-10-26T18:49:27.328632Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"},{"version":"4.0","score":8.7,"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","level":"high"}],"cwes":["CWE-835"],"updated_at":"2026-11-02T15:46:47.822182Z"},{"id":"UBUNTU-CVE-2021-40839","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.","status":"published","published":"2021-09-10T02:15:00Z","modified":"2025-10-24T04:50:34Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:54:29.220315Z"},{"id":"MGASA-2022-0167","title":"Updated python-rencode packages fix security vulnerability","description":"The rencode package through 1.0.6 for Python allows an infinite loop in\ntypecode decoding (such as via ;\\x2f\\x7f), enabling a remote attack that\nconsumes CPU and memory. (CVE-2021-40839)\n","status":"published","published":"2022-05-12T10:24:45Z","modified":"2026-04-16T04:42:49.355357922Z","updated_at":"2026-11-02T15:49:41.849028Z"},{"id":"PYSEC-2021-345","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.","status":"published","published":"2021-09-10T02:15:00Z","modified":"2025-10-09T07:29:23.400797Z","updated_at":"2026-11-02T15:52:52.682031Z"}]}}
