5.3medium
twisted.web has disordered HTTP pipeline response
- Severity
- 5.3medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.88% (higher than 60% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-xc8x-vp79-p3wmPYSEC-2023-224
Description
Twisted is an event-based framework for internet applications. Prior to version 23.10.0rc1, when sending multiple HTTP requests in one TCP packet, twisted.web will process the requests asynchronously without guaranteeing the response order. If one of the endpoints is controlled by an attacker, the attacker can delay the response on purpose to manipulate the response of the second request when a victim launched two requests using HTTP pipeline. Version 23.10.0rc1 contains a patch for this issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| twisted twisted | 23.10.0rc1, before 23.8.0, up to 22.8.0 | CVE List, NVD |
| twisted (PyPI) | before 23.10.0rc1 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| GitHub_M | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| GitHub | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N |
| NVD | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| PyPA Advisory Database | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
Twisted is an event-based framework for internet applications. Prior to version 23.10.0rc1, when sending multiple HTTP requests in one TCP packet, twisted.web will process the requests asynchronously without guaranteeing the response order. If one of the endpoints is controlled by an attacker, the attacker can delay the response on purpose to manipulate the response of the second request when a victim launched two requests using HTTP pipeline. Version 23.10.0rc1 contains a patch for this issue.
GitHub Advisory Database
Twisted is an event-based framework for internet applications. Prior to version 23.10.0rc1, when sending multiple HTTP requests in one TCP packet, twisted.web will process the requests asynchronously without guaranteeing the response order. If one of the endpoints is controlled by an attacker, the attacker can delay the response on purpose to manipulate the response of the second request when a victim launched two requests using HTTP pipeline. Version 23.10.0rc1 contains a patch for this issue.
Details
There's an example faulty program:
from twisted.internet import reactor, endpoints
from twisted.web import server
from twisted.web.proxy import ReverseProxyResource
from twisted.web.resource import Resource
class Second(Resource):
isLeaf = True
def render_GET(self, request):
return b'SECOND\n'
class First(Resource):
isLeaf = True
def render_GET(self, request):
def send_response():
request.write(b'FIRST DELAYED\n')
request.finish()
reactor.callLater(0.5, send_response)
return server.NOT_DONE_YET
root = Resource()
root.putChild(b'second', Second())
root.putChild(b'first', First())
endpoint = endpoints.TCP4ServerEndpoint(reactor, 8080)
endpoint.listen(server.Site(root))
reactor.run()
When two requests for /first and /second are sent in the same order, the second request will be responded to first.
echo -en "GET /first HTTP/1.1\r\nHost: a\r\n\r\nGET /second HTTP/1.1\r\nHost: a\r\n\r\n" | nc localhost 8080
NVD (es)
Twisted es un framework basado en eventos para aplicaciones de Internet. Antes de la versión 23.10.0rc1, al enviar múltiples solicitudes HTTP en un paquete TCP, twisted.web procesará las solicitudes de forma asincrónica sin garantizar el orden de respuesta. Si uno de los endpoints está controlado por un atacante, el atacante puede retrasar la respuesta a propósito para manipular la respuesta de la segunda solicitud cuando una víctima lanzó dos solicitudes utilizando una canalización HTTP. La versión 23.10.0rc1 contiene un parche para este problema.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-46137 changed 2025-11-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-xc8x-vp79-p3wm changed 2025-11-04 | CC-BY-4.0 |
| NVD | CVE-2023-46137 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2023-224 changed 2023-11-08 | CC-BY-4.0 |