Performing Cross-Site Scripting (XSS) Attacks using OWASP Juice Shop
Perform XSS attacks on OWASP Juice Shop to learn how to prevent XSS attacks in your applications in this hands-on lab.

Lab overview
Cross-Site Scripting (XSS) is one of the most widespread and critical web app vulnerabilities. It allows attackers to execute arbitrary JavaScript code in the context of a victim's browser, which can lead to unauthorized actions like session hijacking, data theft, or further attacks. OWASP has rated XSS on 3rd position under the Injection category.
The severity of XSS attacks can be devastating as it allows attackers to execute arbitrary JavaScript code in the context of a victim's browser, which can lead to unauthorized actions like session hijacking, data theft, or further attacks. The attack consequences could be from a simple popup to a full account takeover.
In this lab, you will understand three types of XSS attacks on the OWASP Juice Shop application to understand how XSS attacks work and how to prevent them in your applications.
Objectives
Upon completion of this lab, you will be able to:
- Understand the different types of XSS attacks
- Perform a DOM-based XSS
- Perform a Reflected XSS
- Prevent DOM-based XSS attack in your applications
Who is this lab for?
This lab is designed for:
- Developers who want to understand how XSS attacks work and how to prevent them in their applications
- IT Professionals learning about web application security
- Security professionals who want to understand XSS attacks and how to prevent them
Verified against your live environment
An automated validation engine inspects your actual resources and configurations as you work. Completion means the task was performed — not multiple choice, real-world proficiency.
More labs like this
API-Based XSS: Persisted XSS via API Calls in OWASP Juice Shop
Learn how to perform a persisted XSS attack by interacting directly with the OWASP Juice Shop API.
Advanced XSS Techniques: Bypassing Client-Side and Server-Side Protection in OWASP Juice Shop
Explore advanced XSS techniques to bypass client-side and server-side protection in OWASP Juice Shop.
Persisted XSS via HTTP Header in OWASP Juice Shop
Learn persisted XSS via HTTP Header by finding and exploiting a vulnerability in OWASP Juice Shop.
Related reading
Environment
Every lab includes
- Real environment, pre-credentialed
- Automated checks on every step
- Isolated sandbox, auto cleanup
- AI-recommended next steps
Lab curriculum
- 01
Introduction to Cross-Site Scripting
- 02
Performing DOM based XSS
1 automated check
- 03
Performing Reflected XSS
1 automated check
- 04
Securing Your Application from XSS Attacks
Skills validated
Not the lab you were looking for?
Browse 150+ hands-on labs across AWS, Azure, Kubernetes, Docker, and cloud security.