CVE-2025-67502: Taguette Open Redirect Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-5923-r76v-mprm
CVSS 5.4
CWE-601
Published
Advisory Summary

CVE-2025-67502 is a MODERATE (CVSS 5.4) open redirect vulnerability vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Taguette libraries in the PyPI ecosystem. The issue involves open redirect vulnerability in taguette. Remediation is available by upgrading affected packages to version 1.5.2.

CVE-2025-67502 at a Glance

CVE Identifier CVE-2025-67502
GHSA Identifier GHSA-5923-r76v-mprm
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
Affected Product Taguette
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2025-67502

To remediate this vulnerability, upgrade all affected Taguette dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

taguette fixed: 1.5.2
pip install taguette>=1.5.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show taguette

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-67502, inspect your installed packages using pip:

pip show taguette

Analyze the terminal output to locate any version of Taguette in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.5.2), your application is affected.

Note: The pip show taguette command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Taguette, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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](https://github.com/user-attachments/assets/ac0afe1f-a8ac-4ac0-88f5-1c2cd092ca46)](url) ## 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. ---

CVE-2025-67502 Affected Taguette Versions

1 component(s)
Fixed Versions:
1.5.2
Product / Package Ecosystem Affected Versions Fixed Version
taguette
PyPI
< 1.5.2
1.5.2

References

Frequently Asked Questions

What is CVE-2025-67502?
CVE-2025-67502 is a security vulnerability in Taguette involving Open Redirect Vulnerability in Taguette under CWE-601: URL Redirection to Untrusted Site ('Open Redirect').
Which Taguette versions are affected?
Affected versions include releases prior to 1.5.2 across affected packages: taguette.
What version fixes CVE-2025-67502?
Upgrading to 1.5.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is taguette affected?
Yes, taguette is affected in releases prior to 1.5.2. Upgrade your dependency to 1.5.2 or later.
What is the CVSS score of CVE-2025-67502?
CVE-2025-67502 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2025-67502?
CVE-2025-67502 is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect') (The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.).
How can I check PyPI dependencies for CVE-2025-67502?
Run the dependency tree command: 'pip show taguette'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-5923-r76v-mprm",
  "modified" : "2025-12-10T15:46:45Z",
  "published" : "2025-12-09T14:26:34Z",
  "aliases" : [ "CVE-2025-67502" ],
  "summary" : "Open Redirect Vulnerability in Taguette",
  "details" : "## Summary\n\nAn 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.\n\n**Severity:** Medium to High  \n\n---\n\n## Details\n\nThe 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:\n\n### Location 1: Login Handler (`taguette/web/views.py`, lines 140-144)\n\n```python\ndef _go_to_next(self):\n    next_ = self.get_argument('next', '')\n    if not next_:\n        next_ = self.reverse_url('index')\n    return self.redirect(next_)  # ← No validation of next_ parameter\n```\n\nThis method is called after successful login (line 132) and when an already-logged-in user visits the login page (line 109).\n\n### Location 2: Cookies Prompt Handler (`taguette/web/views.py`, lines 79-85)\n\n```python\ndef post(self):\n    self.set_cookie('cookies_accepted', 'yes', dont_check=True)\n    next_ = self.get_argument('next', '')\n    if not next_:\n        next_ = self.reverse_url('index')\n    return self.redirect(next_)  # ← No validation of next_ parameter\n```\n\nIn 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.\n\n---\n\n[![pic](https://github.com/user-attachments/assets/ac0afe1f-a8ac-4ac0-88f5-1c2cd092ca46)](url)\n\n\n## PoC\n\nSimply replace `[your-taguette-instance]` with your Taguette server domain and test these URLs in your browser:\n\n### Test 1: Cookies Prompt Redirect\n\n```\nhttps://[your-taguette-instance]/cookies?next=https://google.com\n```\n\n1. Open the URL above in your browser\n2. Click \"Accept cookies\" button\n3. **Result:** You are redirected to `https://google.com` (external site)\n\n### Test 2: Login Redirect\n\n```\nhttps://[your-taguette-instance]/login?next=https://google.com\n```\n\n1. Open the URL above in your browser\n2. Log in with valid credentials\n3. **Result:** You are redirected to `https://google.com` (external site)\n\n### Test 3: Already Logged In Redirect\n\n```\nhttps://[your-taguette-instance]/login?next=https://google.com\n```\n\n1. First, log in to Taguette normally\n2. Then open the URL above\n3. **Result:** You are immediately redirected to `https://google.com`\n\n> **Note:** We use `google.com` as a safe external site for testing. In a real attack, this would be a phishing site.\n\n---\n\n## Impact\n\n- **Who is affected:** All users of any Taguette instance running in multi-user mode\n- **Attack vector:** Social engineering / phishing via crafted URLs\n- **Exploitability:** Trivial - requires only crafting a URL with a malicious `next` parameter\n- **Consequences:**\n  - Credential theft through phishing\n  - Malware distribution\n  - Session hijacking\n  - Reputation damage to organizations running Taguette instances\n\nThe vulnerability is particularly dangerous because:\n1. The login page displayed is completely legitimate, building victim trust\n2. Users have just entered their credentials, making them more likely to enter them again on a fake \"session expired\" page\n3. The trusted domain in the URL makes the attack more convincing\n\n---\n\n## Recommended Fix\n\nValidate that the `next` parameter is either a relative URL or points to the same host before redirecting.\n\n### Example Fix\n\nAdd a validation function:\n\n```python\nfrom urllib.parse import urlparse\n\ndef is_safe_url(url, host):\n    \"\"\"Check if URL is safe for redirect (relative or same host).\"\"\"\n    if not url:\n        return False\n    parsed = urlparse(url)\n    # Reject protocol-relative URLs (//evil.com)\n    if url.startswith('//'):\n        return False\n    # Allow relative URLs (no scheme and no netloc)\n    if not parsed.scheme and not parsed.netloc:\n        return True\n    # Allow same-host URLs\n    return parsed.netloc == host\n```\n\nThen update the vulnerable methods:\n\n```python\ndef _go_to_next(self):\n    next_ = self.get_argument('next', '')\n    if not next_ or not is_safe_url(next_, self.request.host):\n        next_ = self.reverse_url('index')\n    return self.redirect(next_)\n```\n\nApply the same fix to the `CookiesPrompt.post()` method.\n\n---",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "taguette"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.5.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.5.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/remram44/taguette/security/advisories/GHSA-5923-r76v-mprm"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-67502"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/remram44/taguette/commit/67de2d2612e7e2572c61cd9627f89c2bfd0f2a36"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/remram44/taguette"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-601" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-12-09T14:26:34Z",
    "nvd_published_at" : "2025-12-10T00:16:11Z"
  }
}