Summary
Hoppscotch contained an open redirect vulnerability that could be abused to exfiltrate authentication tokens by redirecting users to attacker-controlled domains during login or token handling flows.
If a victim is tricked into following a crafted Hoppscotch link, an attacker may capture their tokens and use them to sign in as the victim and take over their account.
Affected context
The vulnerability arises in Hoppscotch's web-based authentication and redirection flows, where user navigation is influenced by URL parameters or redirect targets.
It is most relevant in flows that issue or handle tokens (e.g., login, single sign-on, or callback endpoints) and where the application allows an external URL to be used as a redirect destination without strict validation.
The issue becomes impactful when users can be induced to click crafted links that pass through Hoppscotch and then silently redirect to an attacker-controlled site.
Exploit preconditions
- Attack surface: Public-facing Hoppscotch web interface and any endpoints that handle redirects (e.g., login callbacks or continuation URLs).
- Required access: No prior authentication is strictly required; the attacker needs only the ability to send crafted URLs (phishing, links in chat, etc.) to potential victims.
- Trigger point: A victim's browser follows a Hoppscotch URL that includes a malicious redirect target while an authentication or token-handling flow is in progress or recently completed.
- Why exploitation is possible: The application accepts unvalidated or insufficiently validated redirect targets, allowing tokens or authenticated contexts to be exposed to a domain controlled by the attacker.
Why this happens
This issue maps to CWE-601: Open Redirect, where an application builds or uses a redirect URL derived from user-controllable input without enforcing a strict allowlist or performing robust validation.
When Hoppscotch trusted redirect parameters or continuation URLs provided by the client, it allowed navigation to arbitrary external domains.
In authentication flows, this pattern becomes particularly dangerous because tokens or sensitive context can be attached to these redirects or accessible via browser APIs on the attacker's landing page.
The underlying bug class is improper output handling in navigation logic: redirect destinations should be treated as untrusted input and normalized, validated against a small set of allowed origins, or rejected.
Potential impact
- Theft of authentication tokens from users who follow maliciously crafted links.
- Full account takeover, as attackers can sign in as the victim using stolen tokens.
- Unauthorized access to API projects, collections, environments, or secrets associated with the victim's Hoppscotch account.
- Impersonation of the victim in collaborative or team features.
- Potential pivot to other connected services if tokens also grant access to external APIs or identity providers.
General mitigation guidance
Effective mitigation focuses on hardening redirect and navigation behavior so that user-controlled input cannot dictate arbitrary destinations, especially in authentication contexts.
Recommended defensive patterns include:
- Implementing a strict allowlist of permitted redirect domains and paths, comparing normalized URLs against known-safe origins.
- Supporting only relative paths within the same origin for post-login redirects, rather than arbitrary absolute URLs.
- Normalizing and validating redirect parameters to prevent open redirects, including rejecting protocol-relative, encoded, or mixed-case bypass patterns.
- Decoupling token issuance from redirect parameters: do not attach tokens directly to attacker-controllable URLs and prefer secure cookies or other channel-bound mechanisms.
- Applying least-privilege session design, ensuring that stolen tokens cannot access more resources than necessary and are short-lived and revocable.
- Providing safe default redirect destinations when validation fails, such as a neutral home or dashboard page.
How teams detect issues like this
Identifying open redirect issues typically involves a combination of automated and manual techniques focused on URL handling and navigation logic.
Common detection approaches include:
- Static analysis: Searching for code paths where redirect responses are constructed from request parameters (e.g.,
redirectUri,next,returnTo) without explicit validation against a trusted list of origins. - Code review signals: Flags include the direct use of query or fragment parameters in redirect logic, acceptance of absolute URLs from clients, and lack of normalization or origin checks in URL parsing utilities.
- Security testing: Dynamic application security tests that systematically inject external URLs (including URL-encoded, protocol-relative, and mixed-scheme inputs) into redirect parameters to see if navigation leaves the trusted domain.
- Logging and monitoring: Instrumenting redirect endpoints to log external targets and analyzing logs for suspicious destinations not belonging to the organization's domains.
- Policy enforcement: Introducing linting rules or review checklists that require explicit justification and validation for any redirect to a non-local domain, enforced as part of CI pipelines.

