CVE-2022-21716
Buffer Overflow in Twisted
Reported by github_m · Published March 3, 2022
twisted is fixed in 89c395ee794e85a9657b112c4351417850330ef9 and 22.2.0 (PyPI)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| twisted | PyPI | 89c395ee794e85a9657b112c4351417850330ef9, 22.2.0 |
| python3-twisted | Amazon Linux | 22.4.0-124.amzn2023.0.2 |
| python3-twisted+tls | Amazon Linux | 22.4.0-124.amzn2023.0.2 |
| py3-twisted | Alpine | 22.2.0-r0 |
| twisted | twisted | 22.2.0 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| twisted | twisted | < 22.2.0 |
| amazon:2023 | python3-twisted | 0 |
| PyPI | Twisted | 21.7.0 |
| arch | python-twisted | * |
| amazon:2023 | python3-twisted+tls | 0 |
| alpine | py3-twisted | 0 |
| twisted | twisted | 0 |
Timeline
- Mar 3, 2022 CVE Published
- Mar 4, 2022 EPSS Score (30 in total, the first dated here)
- Nov 25, 2024 CVE Updated
- Mar 9, 2026 Security Advisory (19 in total, the first dated here)
- Jul 7, 2026 Coalition ESS Score
- Nov 22, 2026 Distribution Patch (16 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2022-21716
vulnetix vdb fixes CVE-2022-21716
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-21716/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- [debian-lts-announce] 20220308 [SECURITY] [DLA 2938-1] twisted security update mailing-list
- FEDORA-2022-71b66d4747 vendor-advisory
- FEDORA-2022-9a489fa494 vendor-advisory
- GLSA-202301-02 vendor-advisory
- https://nvd.nist.gov/vuln/detail/CVE-2022-21716 advisory
- https://github.com/advisories/GHSA-rv6r-3f5q-9rgx advisory
- https://github.com/twisted/twisted/commit/98387b39e9f0b21462f6abc7a1325dc370fcdeb1 patch
- https://github.com/pypa/advisory-database/tree/main/vulns/twisted/PYSEC-2022-160.yaml advisory
- https://github.com/twisted/twisted url
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7U6KYDTOLPICAVSR34G2WRYLFBD2YW5K url
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GLKHA6WREIVAMBQD7KKWYHPHGGNKMAG6 url
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7U6KYDTOLPICAVSR34G2WRYLFBD2YW5K url
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GLKHA6WREIVAMBQD7KKWYHPHGGNKMAG6 url