{"id":"CVE-2022-21716","aliases":["GHSA-rv6r-3f5q-9rgx","PYSEC-2022-160"],"url":"https://o3.security/vulnerability/CVE-2022-21716","summary":"Buffer Overflow in Twisted","details":"### Impact\n\nThe Twisted SSH client and server implementation naively accepted an infinite amount of data for the  peer's SSH version identifier.\n\nA malicious peer can trivially craft a request that uses all available memory and crash the server, resulting in denial of service. The attack is as simple as `nc -rv localhost 22 < /dev/zero`.\n\n### Patches\n\nThe issue was fix in GitHub commit https://github.com/twisted/twisted/commit/98387b39e9f0b21462f6abc7a1325dc370fcdeb1\n\nA fix is available in Twisted 22.2.0.\n\n### Workarounds\n\n* Limit access to the SSH server only to trusted source IP addresses.\n* Connect over SSH only to trusted destination IP addresses.\n\n### References\n\nReported at https://twistedmatrix.com/trac/ticket/10284\nDiscussions at https://github.com/twisted/twisted/security/advisories/GHSA-rv6r-3f5q-9rgx\n\n### For more information\n\nFound by vin01","published":"2022-03-03T00:00:00Z","modified":"2026-10-28T02:31:10.085368541Z","cvss":{"score":7.5,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":1,"affectedPackages":[{"ecosystem":"PyPI","name":"twisted","fixedVersion":"22.2.0"}],"fix":{"url":"https://github.com/twisted/twisted/commit/89c395ee794e85a9657b112c4351417850330ef9","label":"twisted/twisted@89c395e"},"references":[{"type":"WEB","url":"https://github.com/twisted/twisted/releases/tag/twisted-22.2.0"},{"type":"WEB","url":"https://twistedmatrix.com/trac/ticket/10284"},{"type":"WEB","url":"https://www.oracle.com/security-alerts/cpuapr2022.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21716.json"},{"type":"ADVISORY","url":"https://github.com/twisted/twisted/security/advisories/GHSA-rv6r-3f5q-9rgx"},{"type":"ADVISORY","url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7U6KYDTOLPICAVSR34G2WRYLFBD2YW5K/"},{"type":"ADVISORY","url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GLKHA6WREIVAMBQD7KKWYHPHGGNKMAG6/"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21716"},{"type":"ADVISORY","url":"https://security.gentoo.org/glsa/202301-02"},{"type":"FIX","url":"https://github.com/twisted/twisted/commit/89c395ee794e85a9657b112c4351417850330ef9"},{"type":"ARTICLE","url":"https://lists.debian.org/debian-lts-announce/2022/03/msg00009.html"},{"type":"WEB","url":"https://github.com/twisted/twisted/commit/98387b39e9f0b21462f6abc7a1325dc370fcdeb1"},{"type":"WEB","url":"https://github.com/pypa/advisory-database/tree/main/vulns/twisted/PYSEC-2022-160.yaml"},{"type":"PACKAGE","url":"https://github.com/twisted/twisted"},{"type":"WEB","url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7U6KYDTOLPICAVSR34G2WRYLFBD2YW5K"},{"type":"WEB","url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GLKHA6WREIVAMBQD7KKWYHPHGGNKMAG6"},{"type":"WEB","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7U6KYDTOLPICAVSR34G2WRYLFBD2YW5K"},{"type":"WEB","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GLKHA6WREIVAMBQD7KKWYHPHGGNKMAG6"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-28T02:31:10.085368541Z"}}