1. Web Security Academy
  2. Client-side prototype pollution
  3. Finding prototype pollution vulnerabilities
  4. Lab

Lab: DOM XSS via an alternative prototype pollution vector

PRACTITIONER

This lab is vulnerable to DOM XSS via client-side prototype pollution. To solve the lab:

  1. Find a source that you can use to add arbitrary properties to the global Object.prototype.

  2. Identify a gadget property that allows you to execute arbitrary JavaScript.

  3. Combine these to call alert().

You can solve this lab manually in your browser, or use DOM Invader to help you.

Register for free to track your learning progress

The benefits of working through PortSwigger's Web Security Academy
  • Practise exploiting vulnerabilities on realistic targets.

  • Record your progression from Apprentice to Expert.

  • See where you rank in our Hall of Fame.

Already got an account? Login here