open-redirect

Validate redirect targets against a host allowlist to prevent open redirect vulnerabilities.

20|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/thejefflarson/soundcheck --skill open-redirect-thejefflarson
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: open-redirect
Source: https://github.com/thejefflarson/soundcheck/tree/main/.claude/skills/open-redirect
Command: npx skills add https://github.com/thejefflarson/soundcheck --skill open-redirect-thejefflarson

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Open redirects enable attackers to redirect users from trusted domains to malicious sites during navigation or authentication flows. This skill provides guidelines and patterns to identify, validate, and remediate such redirects across different languages and frameworks.

Core Features & Use Cases

  • Validate redirect targets against an allowlist of trusted hosts and reject unsafe targets.
  • Block scheme-relative URLs and other risky redirect patterns to prevent phishing and credential theft.
  • Apply to login flows, OAuth callbacks, and any user-input-driven redirects to enforce safe navigation.

Quick Start

Integrate the safe_redirect(target) validator into your web app to ensure all redirects originate from trusted sources.

Frequently Asked Questions about open-redirect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent open redirect vulnerabilities in login flows?

Block open redirects in login flows by validating redirect targets against a trusted host allowlist and rejecting unsafe inputs. Redirecting unvalidated return-to parameters to a safe default prevents attackers from sending users to malicious sites during authentication.

What is an open redirect vulnerability and how does it affect OAuth callbacks?

An open redirect vulnerability allows attackers to redirect users from trusted domains to malicious sites. In OAuth callbacks, validating redirect targets against a host allowlist prevents credential theft and phishing by ensuring callers cannot dictate unsafe navigation paths.

How do I validate redirect URLs to block scheme-relative URLs?

Validate redirect URLs by enforcing a host allowlist and explicitly blocking scheme-relative URLs. Applying a safe_redirect validator to user-input-driven redirects ensures that untrusted targets are rejected and replaced with a safe default destination.

Can I use a redirect validator for any user-input-driven redirects or only authentication?

You can use a redirect validator for any user-input-driven redirects, not just authentication. It applies to OAuth callbacks and all navigation features, enforcing a host allowlist and blocking risky patterns to ensure safe navigation across the entire web application.

Why does my web app redirect users to untrusted domains despite using a return-to parameter?

Your web app redirects to untrusted domains because return-to parameters lack validation against a host allowlist. Blocking scheme-relative URLs and redirecting to a safe default on validation failure prevents this open redirect vulnerability.