{"id":2670,"cve":"CVE-2026-116578","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2026-116578\/","cwe":"CWE-601","cwe_number":601,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/601","cvss_score":2.1,"published":"2026-10-26","owasp":"A01 Broken Access Control","odc":"Interface","cdc":"Incorrect Interface","category":"Input Validation and Sanitization","subcategory":"Insecure Parsing or Deserialization","scope":"Remote","impact":"Unauthorized Access","summary":"Open redirect via crafted paths in Tornado RedirectHandler before 6.6.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2026-116578\/","description":"Tornado is a Python web framework and asynchronous networking library. Prior to 6.6, tornado.web.RedirectHandler URL templates can place regex-capture substitutions where crafted request paths change the redirect scheme or network location. Affected placements include substitutions at the start of a path, directly after a fixed host, or at the beginning of the template, including protocol-relative, absolute, backslash, encoded, host-extension, and user-info variants interpreted by browsers as attacker-controlled destinations. Static templates and substitutions after a fixed host followed by a slash are not affected. An attacker can use the resulting open redirect on the application's domain for phishing. This issue is fixed in version 6.6.","solution":"Upgrade Tornado to version\u202f6.6 or later.","affected_component":"Tornado","fixed_by_upgrading":true,"vulnerable_code":"import tornado.ioloop\nimport tornado.web\n\nclass OpenRedirectHandler(tornado.web.RequestHandler):\n    # VULNERABLE: uses user-controlled path in redirect template\n    def get(self):\n        # The template allows regex capture substitution that can alter scheme or host\n        target = self.get_argument(\"next\", \"\/\")\n        self.redirect(f\"\/redirect\/{target}\")\n\ndef make_app():\n    return tornado.web.Application([\n        (r\"\/open\", OpenRedirectHandler),\n    ])\n\ndef main():\n    app = make_app()\n    app.listen(8888)\n    tornado.ioloop.IOLoop.current().start()\n","patched_code":"import tornado.ioloop\nimport tornado.web\nimport urllib.parse\n\nclass OpenRedirectHandler(tornado.web.RequestHandler):\n    # FIX: validates that the redirect target is a relative path on the same host\n    def get(self):\n        target = self.get_argument(\"next\", \"\/\")\n        parsed = urllib.parse.urlparse(target)\n        # Reject absolute URLs or scheme changes\n        if parsed.scheme or parsed.netloc:\n            target = \"\/\"\n        self.redirect(f\"\/redirect\/{target}\")\n\ndef make_app():\n    return tornado.web.Application([\n        (r\"\/open\", OpenRedirectHandler),\n    ])\n\ndef main():\n    app = make_app()\n    app.listen(8888)\n    tornado.ioloop.IOLoop.current().start()\n","payload_needed":true,"payload":null,"payload_status":"model_refused","published_fix":[{"repository":"tornadoweb\/tornado","commit_url":"https:\/\/github.com\/tornadoweb\/tornado\/commit\/940ea725bdd9bc68231d68a105eef17ea6e11233","commit_subject":"web: Block open redirects in RedirectHandler","units":[{"file":"tornado\/web.py","function":"RedirectHandler.get"}]},{"repository":"tornadoweb\/tornado","commit_url":"https:\/\/github.com\/tornadoweb\/tornado\/commit\/cc75ab0eb3af459c714895a49f682ad354f50117","commit_subject":"web: Don't let RedirectHandler substitutions change the scheme or netloc","units":[{"file":"tornado\/web.py","function":null},{"file":"tornado\/web.py","function":"RedirectHandler.get"},{"file":"tornado\/web.py","function":"_is_protocol_relative"}]},{"repository":"tornadoweb\/tornado","commit_url":"https:\/\/github.com\/tornadoweb\/tornado\/commit\/ccb6a2e5482f17997efd4a74b8200d5b4babc035","commit_subject":"web: Catch backslash and whitespace variants of protocol-relative redirects","units":[{"file":"tornado\/web.py","function":null},{"file":"tornado\/web.py","function":"RedirectHandler.get"},{"file":"tornado\/web.py","function":"StaticFileHandler.validate_absolute_path"}]}],"references":null}