Medium

Open Redirect Vulnerability in Taguette

  • Disclosed: 09.12.2025
  • Updated: 11.10.2026 13:18

Summary

An Open Redirect vulnerability exists in Taguette that allows attackers to craft malicious URLs that redirect users to arbitrary external websites after authentication. This can be exploited for phishing attacks where victims believe they are interacting with a trusted Taguette instance but are redirected to a malicious site designed to steal credentials or deliver malware.

Severity: Medium to High


Details

The application accepts a user-controlled next parameter and uses it directly in HTTP redirects without any validation. The vulnerable code is located in two places:

Location 1: Login Handler (taguette/web/views.py, lines 140-144)

python
def _go_to_next(self):
    next_ = self.get_argument('next', '')
    if not next_:
        next_ = self.reverse_url('index')
    return self.redirect(next_)  # ← No validation of next_ parameter

This method is called after successful login (line 132) and when an already-logged-in user visits the login page (line 109).

Location 2: Cookies Prompt Handler (taguette/web/views.py, lines 79-85)

python
def post(self):
    self.set_cookie('cookies_accepted', 'yes', dont_check=True)
    next_ = self.get_argument('next', '')
    if not next_:
        next_ = self.reverse_url('index')
    return self.redirect(next_)  # ← No validation of next_ parameter

In both cases, if next_ is provided by the user, it is passed directly to self.redirect() without checking whether it points to the same host or is a relative URL.


pic

PoC

Simply replace [your-taguette-instance] with your Taguette server domain and test these URLs in your browser:

Test 1: Cookies Prompt Redirect

https://[your-taguette-instance]/cookies?next=https://google.com
  1. Open the URL above in your browser
  2. Click "Accept cookies" button
  3. Result: You are redirected to https://google.com (external site)

Test 2: Login Redirect

https://[your-taguette-instance]/login?next=https://google.com
  1. Open the URL above in your browser
  2. Log in with valid credentials
  3. Result: You are redirected to https://google.com (external site)

Test 3: Already Logged In Redirect

https://[your-taguette-instance]/login?next=https://google.com
  1. First, log in to Taguette normally
  2. Then open the URL above
  3. Result: You are immediately redirected to https://google.com

Note: We use google.com as a safe external site for testing. In a real attack, this would be a phishing site.


Impact

  • Who is affected: All users of any Taguette instance running in multi-user mode
  • Attack vector: Social engineering / phishing via crafted URLs
  • Exploitability: Trivial - requires only crafting a URL with a malicious next parameter
  • Consequences:
    • Credential theft through phishing
    • Malware distribution
    • Session hijacking
    • Reputation damage to organizations running Taguette instances

The vulnerability is particularly dangerous because:

  1. The login page displayed is completely legitimate, building victim trust
  2. Users have just entered their credentials, making them more likely to enter them again on a fake "session expired" page
  3. The trusted domain in the URL makes the attack more convincing

Recommended Fix

Validate that the next parameter is either a relative URL or points to the same host before redirecting.

Example Fix

Add a validation function:

python
from urllib.parse import urlparse

def is_safe_url(url, host):
    """Check if URL is safe for redirect (relative or same host)."""
    if not url:
        return False
    parsed = urlparse(url)
    # Reject protocol-relative URLs (//evil.com)
    if url.startswith('//'):
        return False
    # Allow relative URLs (no scheme and no netloc)
    if not parsed.scheme and not parsed.netloc:
        return True
    # Allow same-host URLs
    return parsed.netloc == host

Then update the vulnerable methods:

python
def _go_to_next(self):
    next_ = self.get_argument('next', '')
    if not next_ or not is_safe_url(next_, self.request.host):
        next_ = self.reverse_url('index')
    return self.redirect(next_)

Apply the same fix to the CookiesPrompt.post() method.


Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) taguette < 1.5.2 1.5.2

References

CVSS score 5.4/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
Weakness (CWE)
CWE-601
Platform
Python (PyPI)
Package
taguette
Disclosed
09.12.2025
Updated
11.10.2026 13:18

Sources and licenses

OSV / GitHub Advisory Database - PYSEC-2026-1948 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-5923-r76v-mprm - CC BY 4.0

Vulnerability history: taguette

All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
3
First → latest
10.2025 12.2025
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 1
  • Medium 2

Disclosures per year

  1. 2025: 3
  2. 2026: 0
  1. Open Redirect Vulnerability in Taguette this entry
    Medium · 5.4 CVE-2025-67502 < 1.5.2 1.5.2
  2. High · 7.1 CVE-2025-62527 < 1.5.0 1.5.0

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.