{"id":"CVE-2025-67502","aliases":["CVE-2025-67502","GHSA-5923-r76v-mprm","PYSEC-2026-1948"],"related":[],"kind":"vulnerability","state":"published","title":"Taguette does not safeguard against Open Redirect","summary":"Taguette is an open source qualitative research tool. In versions 1.5.1 and below,  attackers can craft malicious URLs that redirect users to arbitrary external websites after authentication. The application accepts a user-controlled next parameter and uses it directly in HTTP redirects without any validation. 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. This issue is fixed in version 1.5.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Taguette is an open source qualitative research tool. In versions 1.5.1 and below,  attackers can craft malicious URLs that redirect users to arbitrary external websites after authentication. The application accepts a user-controlled next parameter and uses it directly in HTTP redirects without any validation. 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. This issue is fixed in version 1.5.2.","source":"cvelist"},{"lang":"en","text":"## 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---","format":"markdown","source":"ghsa"},{"lang":"es","text":"Taguette es una herramienta de investigación cualitativa de código abierto. En las versiones 1.5.1 e inferiores, los atacantes pueden crear URL maliciosas que redirigen a los usuarios a sitios web externos arbitrarios después de la autenticación. La aplicación acepta un parámetro 'next' controlado por el usuario y lo utiliza directamente en las redirecciones HTTP sin ninguna validación. Esto puede ser explotado para ataques de phishing donde las víctimas creen que están interactuando con una instancia de Taguette de confianza pero son redirigidas a un sitio malicioso diseñado para robar credenciales o entregar malware. Este problema está solucionado en la versión 1.5.2.","source":"nvd"}],"published":"2025-12-09T14:26:34.000Z","modified":"2026-10-14T21:10:00.183Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-601"],"affected":[{"ranges":[{"version":"< 1.5.2","status":"affected"}],"vendor":"remram44","product":"taguette","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.5.2"}],"ecosystem":"PyPI","package":"taguette","purl":"pkg:pypi/taguette","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.5.2"}],"vendor":"taguette","product":"taguette","cpe":"cpe:2.3:a:taguette:taguette:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.5.2"}],"ecosystem":"PyPI","package":"taguette","purl":"pkg:pypi/taguette","source":"pysec"}],"references":[{"url":"https://github.com/remram44/taguette/security/advisories/GHSA-5923-r76v-mprm","tags":["exploit","third-party-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/remram44/taguette/commit/67de2d2612e7e2572c61cd9627f89c2bfd0f2a36","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-67502","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/remram44/taguette","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/taguette","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-5923-r76v-mprm","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-12-10T15:37:54.495Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-67502","url":"https://www.cve.org/CVERecord?id=CVE-2025-67502","licence":"CVE Terms of Use","modified":"2025-12-10T15:38:54.717Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5923-r76v-mprm","url":"https://github.com/advisories/GHSA-5923-r76v-mprm","licence":"CC-BY-4.0","modified":"2026-07-07T17:56:25.821Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-67502","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-67502","licence":"Public domain","modified":"2026-10-14T21:10:00.183Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-1948","url":"https://osv.dev/vulnerability/PYSEC-2026-1948","licence":"CC-BY-4.0","modified":"2026-07-07T17:48:12.647Z"}],"updatedAt":"2026-11-25T22:59:09.129Z","epss":{"score":0.00279,"percentile":0.21822,"date":"2026-12-01T12:00:22.000Z"}}