Headline
Debian Security Advisory 5797-1
Debian Linux Security Advisory 5797-1 - Multiple security issues were found in Twisted, an event-based framework for internet applications, which could result in incorrect ordering of HTTP requests or cross-site scripting.
-----BEGIN PGP SIGNED MESSAGE-----Hash: SHA512- -------------------------------------------------------------------------Debian Security Advisory DSA-5797-1 [email protected]://www.debian.org/security/ Moritz MuehlenhoffOctober 25, 2024 https://www.debian.org/security/faq- -------------------------------------------------------------------------Package : twistedCVE ID : CVE-2023-46137 CVE-2024-41671 CVE-2024-41810Multiple security issues were found in Twisted, an event-based frameworkfor internet applications, which could result in incorrect ordering ofHTTP requests or cross-site scripting.For the stable distribution (bookworm), these problems have been fixed inversion 22.4.0-4+deb12u1.We recommend that you upgrade your twisted packages.For the detailed security status of twisted please refer toits security tracker page at:https://security-tracker.debian.org/tracker/twistedFurther information about Debian Security Advisories, how to applythese updates to your system and frequently asked questions can befound at: https://www.debian.org/security/Mailing list: [email protected] PGP SIGNATURE-----iQIzBAEBCgAdFiEEtuYvPRKsOElcDakFEMKTtsN8TjYFAmcb3uEACgkQEMKTtsN8TjZEtw//VpqsmdlkvjKnR1rYRjoopuH1cx5lSdB5u7EoXGiSKTp9Dt5l2Q44fl+Pi2uLjO/IX5ZbtiWDeNvBoFYfaqvHBlv680WiaUnmvTzPuovB2fT5Q7ZOdI7SH5y2yhYpmaapZSb2kRYgcFO38Vi3M1LxU60t7lSXd3F5+6BopPEBRT9q0nwHAPB8NSvhC/VQQa9BejPIggJD1koYxJlQz76VhAi3c7W60ySRk2YKQryYdyZwdpsvrrz0G05nwZO+f6tXVihehGT2rv5OpfwGmcHZ/iwxY/IFpywdkrsnx1mV2NGVZw3t2JQYl7r/Vs3XLg4C3Zx2NLzZgBp007ZG4vz2f4LmEe9M+bYI8NgCAzPRUJg2T4+ZoD09Dmmlk/yo+ihBxSef3H5nDkiO9a4OsEQzk74o1Hlg1ZbiUqk/7BdSar92LszlzuJVXqpAHVtIIlUwkS+L6Z+O2iYhSBUTumrrrbRsdoo00uvHWeGOw1VmRZKYdMpoxX2St60BRUdBZuIHlcw5qoymiIDOI/fgykCtdAbdCWj/GE6AGO4i7scOj8u8deqh/N5kKNzdijjkzmEQvd7e3/VSEVfBc+4CJHUMKVELaNDGflaneWxXpHLmz/pu2hwNoPw2XL9X1bVzvph3A+Yl+oXLZUJkrELuo9Rmnv7qJ9MS9QnOpHyw0KFgEsQ==faBY-----END PGP SIGNATURE-----
Related news
Red Hat Security Advisory 2024-7312-03 - An update is now available for Red Hat Ansible Automation Platform 2.4. Issues addressed include cross site scripting and html injection vulnerabilities.
Ubuntu Security Notice 6988-1 - It was discovered that Twisted incorrectly handled response order when processing multiple HTTP requests. A remote attacker could possibly use this issue to delay and manipulate responses. This issue only affected Ubuntu 24.04 LTS. It was discovered that Twisted did not properly sanitize certain input. An attacker could use this vulnerability to possibly execute an HTML injection leading to a cross-site scripting attack.
Ubuntu Security Notice 6988-1 - It was discovered that Twisted incorrectly handled response order when processing multiple HTTP requests. A remote attacker could possibly use this issue to delay and manipulate responses. This issue only affected Ubuntu 24.04 LTS. It was discovered that Twisted did not properly sanitize certain input. An attacker could use this vulnerability to possibly execute an HTML injection leading to a cross-site scripting attack.
### Summary The `twisted.web.util.redirectTo` function contains an HTML injection vulnerability. If application code allows an attacker to control the redirect URL this vulnerability may result in Reflected Cross-Site Scripting (XSS) in the redirect response HTML body. ### Details Twisted’s `redirectTo` function generates an `HTTP 302 Redirect` response. The response contains an HTML body, built for exceptional cases where the browser doesn’t properly handle the redirect, allowing the user to click a link, navigating them to the specified destination. The function reflects the destination URL in the HTML body without any output encoding. ```python # https://github.com/twisted/twisted/blob/trunk/src/twisted/web/_template_util.py#L88 def redirectTo(URL: bytes, request: IRequest) -> bytes: # ---snip--- content = b""" <html> <head> <meta http-equiv=\"refresh\" content=\"0;URL=%(url)s\"> </head> <body bgcolor=\"#FFFFFF\" text=\"#000000\"> <a href=\"%(url)...
### Summary The HTTP 1.0 and 1.1 server provided by twisted.web could process pipelined HTTP requests out-of-order, possibly resulting in information disclosure. ### PoC 0. Start a fresh Debian container: ```sh docker run --workdir /repro --rm -it debian:bookworm-slim ``` 1. Install twisted and its dependencies: ```sh apt -y update && apt -y install ncat git python3 python3-pip \ && git clone --recurse-submodules https://github.com/twisted/twisted \ && cd twisted \ && pip3 install --break-system-packages . ``` 2. Run a twisted.web HTTP server that echos received requests' methods. e.g., the following: ```python from twisted.web import server, resource from twisted.internet import reactor class TheResource(resource.Resource): isLeaf = True def render_GET(self, request) -> bytes: return b"GET" def render_POST(self, request) -> bytes: return b"POST" site = server.Site(TheResource()) reactor.listenTCP(80, site) reactor.run() ``` 3. Send it a PO...
Red Hat Security Advisory 2024-1640-03 - An update is now available for Red Hat Ansible Automation Platform 2.4. Issues addressed include HTTP request smuggling, denial of service, local file inclusion, memory leak, and traversal vulnerabilities.
Red Hat Security Advisory 2024-1518-03 - An update for python-twisted is now available for Red Hat OpenStack Platform 16.2.
Red Hat Security Advisory 2024-1516-03 - An update for python-twisted is now available for Red Hat OpenStack Platform 16.1.
Red Hat Security Advisory 2024-0322-03 - An update is now available for Red Hat Ansible Automation Platform 2.4. Issues addressed include a local file inclusion vulnerability.
Ubuntu Security Notice 6575-1 - It was discovered that Twisted incorrectly escaped host headers in certain 404 responses. A remote attacker could possibly use this issue to perform HTML and script injection attacks. This issue only affected Ubuntu 20.04 LTS and Ubuntu 22.04 LTS. It was discovered that Twisted incorrectly handled response order when processing multiple HTTP requests. A remote attacker could possibly use this issue to delay responses and manipulate the responses of second requests.
### Summary When sending multiple HTTP requests in one TCP packet, twisted.web will process the requests asynchronously without guaranteeing the response order. ### Details There's an example faulty program: ```python 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` ...
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.