portswigger-all-labs

Complete PortSwigger Web Security Academy Lab Writeups Detailed, categorized solutions for every lab — from APPRENTICE to EXPERT — covering all 30 vulnerability types.

View on GitHub

Labs Covered

This write-up focuses on the following EXPERT-level lab from the PortSwigger Web Security Academy related to HTTP Host Header Attacks:

7 Password reset poisoning via dangling markup

This lab demonstrates how attackers can exploit dangling markup combined with unsanitized Host headers to poison password reset links and compromise user accounts.

LAB 7 - Password reset poisoning via dangling markup

Lab Description

image

Solution

Step-by-step Process

1. Trigger Password Reset for Wiener

2. Monitor Exploit Server for Reset Email

3. Test Host Header Manipulation

4. Test with Exploit Server Domain

image

5. Testing with Arbitrary Port

image

6. Injecting a Malicious Host Payload

image

7. Verify on Exploit Server

8. Login as Wiener

9. Repeat for Carlos

10. Extract Carlos’s Token

image

11. Log in as Carlos

image