Skip to main content
Module 6 · Lesson 4 of 423/42 in the course~16 min
Module lessons (4/4)

Open Redirects & SSRF URL Parsing Traps

Lesson preview6 hands-on exercises readyApplication & Web Security · Module 6 — Input Validation, Path Traversal, ReDoS & SSRF

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@host confusion to smuggle internal cloud metadata IPs past .startsWith() checks (SSRF).
  • Recognize obfuscated internal IPs (127.*, RFC1918, 169.254.*, [::ffff:169.254.169.254], decimal 2852039166) 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

  1. 11. Userinfo Confusion, IPv6/Decimal Obfuscation & Open Redirects
  2. 22. Interactive Explorer: SSRF userinfo vs new URL() Parser
  3. 33. Progressive Labs: Warm-Up → Attack → Defend → Harden
  4. 44. Checkpoints & Code Review
Pro Lesson · Module 6 — Input Validation, Path Traversal, ReDoS & SSRF

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.