CVE-2022-21716 | Buffer Overflow in Twisted

Exp

Twisted is an event-based framework for internet applications, supporting Python 3.6+. Prior to 22.2.0, Twisted SSH client and server implement is able to accept an infinite amount of data for the peer's SSH version identifier. This ends up with a buffer using all the available memory. The attach is a simple as `nc -rv localhost 22 < /dev/zero`. A patch is available in version 22.2.0. There are currently no known workarounds.

Published: 2022-03-03 Last update: 2026-06-17 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2022-21716 is rated High Exploit Risk (75.7/100): CVSS High severity, with medium exploitation likelihood (EPSS 3.61%). Core evidence: 1 public exploit reference(s) are indexed (Exploit-DB). Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2022-21716

EDB-ID Source Kind Published Link
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2022-21716

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 3.67% 3.61% -0.06%
2 2026-05-30 1.24% 3.67% +2.43%
3 2026-04-14 1.24%

Full EPSS history (33 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2022-21716

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
7.5 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
3.9 3.6 [email protected]
7.5 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
3.9 3.6 [email protected]
5.0 2.0 MEDIUM
AV:N/AC:L/Au:N/C:N/I:N/A:P Click to expand
Access vector (AV:N)
Can be exploited remotely over network reachability.
Access complexity (AC:L)
Exploitation conditions are straightforward and predictable.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:N)
No confidentiality impact.
Integrity impact (I:N)
No integrity impact.
Availability impact (A:P)
Partial availability impact.
10.0 2.9 [email protected]

Weakness enumeration for CVE-2022-21716

GitHub Security Advisory for CVE-2022-21716

GHSA-rv6r-3f5q-9rgx · Severity: high · Ecosystem: pip — Twisted SSH client and server deny of service during SSH handshake.

OS Trackers for CVE-2022-21716

vendor priority summary link
alpine high CVE-2022-21716: 1 source package rows (py3-twisted); 7 state rows across 7 repos (3.17-community, 3.18-community, 3.19-community, 3.20-community, 3.21-community, 3.22-community, edge-community); fixed 7, open 0. https://security.alpinelinux.org/vuln/CVE-2022-21716
debian not yet assigned CVE-2022-21716 not yet assigned priority: Debian including 1 source packages (twisted), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2022-21716
gentoo low CVE-2022-21716: 1 GLSA(s) (202301-02), 1 atom(s) (dev-python/twisted); latest impact low. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2022-21716
redhat high https://access.redhat.com/security/cve/CVE-2022-21716
suse high CVE-2022-21716 severity important: SUSE including 27 source package names (python-Twisted-15.2.1-9.17.1, python-Twisted-doc-19.10.0-150200.3.12.1, …), 58 product×package rows across 34 product lines (HPE Helion OpenStack 8, Image SLES15-SP3-BYOS-Azure, … (34 product lines)): Fixed 58. https://www.suse.com/security/cve/CVE-2022-21716/
ubuntu medium CVE-2022-21716 medium priority: Ubuntu including 1 source packages (twisted), 7 status rows across 7 suites (bionic, focal, impish, jammy, trusty, upstream, xenial): released 7. https://ubuntu.com/security/CVE-2022-21716

Affected software / configurations for CVE-2022-21716

Vendor Product Version Raw CPE
twisted twisted >= 21.7.0, < 22.2.0 cpe:2.3:a:twisted:twisted:*:*:*:*:*:*:*:*
debian debian_linux 9.0 cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
oracle http_server 12.2.1.3.0 cpe:2.3:a:oracle:http_server:12.2.1.3.0:*:*:*:*:*:*:*
oracle http_server 12.2.1.4.0 cpe:2.3:a:oracle:http_server:12.2.1.4.0:*:*:*:*:*:*:*
oracle zfs_storage_appliance_kit 8.8 cpe:2.3:a:oracle:zfs_storage_appliance_kit:8.8:*:*:*:*:*:*:*
fedoraproject fedora 35 cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
fedoraproject fedora 36 cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*

References for CVE-2022-21716

URL Tags
https://github.com/twisted/twisted/commit/89c395ee794e85a9657b112c4351417850330ef9 Patch Third Party Advisory
https://github.com/twisted/twisted/releases/tag/twisted-22.2.0 Release Notes Third Party Advisory
https://github.com/twisted/twisted/security/advisories/GHSA-rv6r-3f5q-9rgx Exploit Patch Third Party Advisory
https://lists.debian.org/debian-lts-announce/2022/03/msg00009.html Mailing List Third Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7U6KYDTOLPICAVSR34G2WRYLFBD2YW5K/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GLKHA6WREIVAMBQD7KKWYHPHGGNKMAG6/
https://security.gentoo.org/glsa/202301-02 Third Party Advisory
https://twistedmatrix.com/trac/ticket/10284 Issue Tracking Vendor Advisory
https://www.oracle.com/security-alerts/cpuapr2022.html Patch Third Party Advisory
cvelogic Threat Intelligence