Twisted is an event-based framework for internet applications, supporting Python 3.6+. Prior to version 22.4.0rc1, the Twisted Web HTTP 1.1 server, located in the twisted.web.http
module, parsed several HTTP request constructs more leniently than permitted by RFC 7230. This non-conformant parsing can lead to desync if requests pass through multiple HTTP parsers, potentially resulting in HTTP request smuggling. Users who may be affected use Twisted Webs HTTP 1.1 server and/or proxy and also pass requests through a different HTTP server and/or proxy. The Twisted Web client is not affected. The HTTP 2.0 server uses a different parser, so it is not affected. The issue has been addressed in Twisted 22.4.0rc1. Two workarounds are available: Ensure any vulnerabilities in upstream proxies have been addressed, such as by upgrading them; or filter malformed requests by other means, such as configuration of an upstream proxy.
The product acts as an intermediary HTTP agent (such as a proxy or firewall) in the data flow between two entities such as a client and server, but it does not interpret malformed HTTP requests or responses in ways that are consistent with how the messages will be processed by those entities that are at the ultimate destination.
Name | Vendor | Start Version | End Version |
---|---|---|---|
Twisted | Twisted | * | 22.4.0 (excluding) |
Red Hat Enterprise Linux 7 | RedHat | python-twisted-web-0:12.1.0-8.el7_9 | * |
Red Hat OpenStack Platform 16.1 | RedHat | python-twisted-0:16.4.1-20.el8ost | * |
Red Hat OpenStack Platform 16.2 | RedHat | python-twisted-0:16.4.1-20.el8ost | * |
Twisted | Ubuntu | bionic | * |
Twisted | Ubuntu | devel | * |
Twisted | Ubuntu | esm-infra-legacy/trusty | * |
Twisted | Ubuntu | esm-infra/bionic | * |
Twisted | Ubuntu | esm-infra/xenial | * |
Twisted | Ubuntu | focal | * |
Twisted | Ubuntu | impish | * |
Twisted | Ubuntu | jammy | * |
Twisted | Ubuntu | kinetic | * |
Twisted | Ubuntu | lunar | * |
Twisted | Ubuntu | mantic | * |
Twisted | Ubuntu | noble | * |
Twisted | Ubuntu | oracular | * |
Twisted | Ubuntu | trusty | * |
Twisted | Ubuntu | trusty/esm | * |
Twisted | Ubuntu | upstream | * |
Twisted | Ubuntu | xenial | * |
HTTP requests or responses (“messages”) can be malformed or unexpected in ways that cause web servers or clients to interpret the messages in different ways than intermediary HTTP agents such as load balancers, reverse proxies, web caching proxies, application firewalls, etc. For example, an adversary may be able to add duplicate or different header fields that a client or server might interpret as one set of messages, whereas the intermediary might interpret the same sequence of bytes as a different set of messages. For example, discrepancies can arise in how to handle duplicate headers like two Transfer-encoding (TE) or two Content-length (CL), or the malicious HTTP message will have different headers for TE and CL. The inconsistent parsing and interpretation of messages can allow the adversary to “smuggle” a message to the client/server without the intermediary being aware of it. This weakness is usually the result of the usage of outdated or incompatible HTTP protocol versions in the HTTP agents.