Module lessons (4/4)
Open Redirects & SSRF URL Parsing Traps
Exploit userinfo URL confusion against metadata endpoints, then lock down outbound webhooks and local redirect paths.
What you'll learn in this lesson
- Exploit URL
userinfo@hostconfusion to smuggle internal cloud metadata IPs past.startsWith()checks (SSRF). - Recognize obfuscated internal IPs (
127.*, RFC1918,169.254.*,[::ffff:169.254.169.254], decimal2852039166) and open redirects (//evil,/\evil). - Implement
new URL()allowlist checks, hardened private-IP validators, and same-origin path sanitization — and disable unverified 3xx redirects.
Overview
Server-Side Request Forgery (SSRF) turns your backend into an internal proxy fetching cloud instance metadata (http://169.254.169.254/latest/meta-data/) or private Redis/admin ports. Open Redirects abuse ?next=... login parameters to launch credible phishing redirects off your trusted domain. Both bugs happen when string prefixes substitute…
Compare four subtle URL parsing pitfalls and their defenses:
Sections covered in this lesson
- 11. Userinfo Confusion, IPv6/Decimal Obfuscation & Open Redirects
- 22. Interactive Explorer: SSRF
userinfovsnew URL()Parser - 33. Progressive Labs: Warm-Up → Attack → Defend → Harden
- 44. Checkpoints & Code Review
Unlock "Open Redirects & SSRF URL Parsing Traps" and the full Application & Web Security curriculum
Exploit userinfo URL confusion against metadata endpoints, then lock down outbound webhooks and local redirect paths.
Unlock all 6 hands-on exercises in this lesson plus every advanced WebAssembly module with automated checks.
- Instant access to all advanced modules in Application & Web Security plus 17 more courses
- Hands-on browser exercises with automated test suites and solutions
- 14-day money-back guarantee processed via Paddle.com
14-day guarantee · Cancel anytimeModule 1, all 18 interactive games, and cheatsheets are always free.