All vulnerabilities

PyPI

CVE-2026-116578

Tornado: Open redirect in RedirectHandler via protocol-relative URLs

Severity
Low
Published
28 Oct 2026
Last changed
28 Oct 2026
Added to UpHeron
23 Nov 2026
Fixed in
6.6
Exploit chance
0.5% in the next 30 daysHigher than 39% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Open redirect (CWE-601)
Also known as
GHSA-pw9p-v7r6-gx4p
Sources
OSV.dev and GitHub

Description

tornado.web.RedirectHandler builds its target URL by substituting parts of the request path into a template. Depending on where those substitutions appear in the template, an attacker can craft a request that redirects to a host of their choosing. This creates an open redirect on the application's domain, which can be used in phishing.

Applications are affected if they use RedirectHandler with a URL template where a regex capture group can influence the scheme or host of the redirect. This includes:

  • A substitution at the start of the path, for example (r"/(.*)/target", RedirectHandler, {"url": "/{0}/destination"}). A request to https://example.com//evil.com/target redirects to //evil.com/destination, a protocol-relative URL pointing to evil.com. Variants using backslashes or encoded characters have the same effect, because browsers treat them as equivalent to //.
From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Workarounds

  • Change RedirectHandler templates so every substitution comes after a fixed prefix ending in /, or write capture-group regexes that cannot match characters such as /, \, @, . or : where they could affect the host.
  • Alternatively, replace RedirectHandler with a custom handler that validates the target before calling self.redirect().
Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
tornadoPyPI · osv:PyPI:tornado
  • Every version before 6.6

About tornado

Weekly downloads (PyPI)
28,633,007PyPI Stats, 23 Nov 2026

References