Vulnerability · Published Mar 3, 2022 · Assigned by GitHub_M
CVE-2022-21716Buffer Overflow in Twisted
High 7.5
In plain English
A high-severity buffer overflow in twisted from twisted. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 3.5% (higher than 89% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | py3-twisted | 22.2.0-r0 | ALPINE-CVE-2022-21716 |
| Alpine:v3.21 | py3-twisted | 22.2.0-r0 | ALPINE-CVE-2022-21716 |
| Alpine:v3.22 | py3-twisted | 22.2.0-r0 | ALPINE-CVE-2022-21716 |
| Alpine:v3.23 | py3-twisted | 22.2.0-r0 | ALPINE-CVE-2022-21716 |
| Alpine:v3.24 | py3-twisted | 22.2.0-r0 | ALPINE-CVE-2022-21716 |
| Debian:12 | twisted | 22.2.0-1 | DEBIAN-CVE-2022-21716 |
| Debian:13 | twisted | 22.2.0-1 | DEBIAN-CVE-2022-21716 |
| Debian:14 | twisted | 22.2.0-1 | DEBIAN-CVE-2022-21716 |
| PyPI | twisted | 22.2.0 | PYSEC-2022-160 |
| PyPI | twisted | 22.2.0 | GHSA-rv6r-3f5q-9rgx |
| Ubuntu:22.04:LTS | twisted | 22.1.0-2ubuntu2.1 | UBUNTU-CVE-2022-21716 |
| Ubuntu:22.04:LTS | twisted | 22.1.0-2ubuntu2.1 | USN-5354-2 |
Affected products (as reported)
Weakness: CWE-120 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
References
- https://github.com/twisted/twisted/security/advisories/GHSA-rv6r-3f5q-9rgx
- https://github.com/twisted/twisted/commit/89c395ee794e85a9657b112c4351417850330ef9
- https://github.com/twisted/twisted/releases/tag/twisted-22.2.0
- https://twistedmatrix.com/trac/ticket/10284
- [debian-lts-announce] 20220308 [SECURITY] [DLA 2938-1] twisted security update mailing-list
- https://www.oracle.com/security-alerts/cpuapr2022.html
- FEDORA-2022-71b66d4747 vendor-advisory
- FEDORA-2022-9a489fa494 vendor-advisory
- GLSA-202301-02 vendor-advisory