๐Ÿงช OWASP Top 10 Lab โ€” Stored Cross Site Scripting (XSS)

Category: A05:Injection

๐Ÿง  Vulnerability Type

๐ŸŽฏ Objective

Demonstrate a Stored Cross Site Scripting (Persistent XSS) vulnerability using DVWA by injecting malicious JavaScript that executes for all users viewing stored content.

๐Ÿ›  Lab Environment

๐Ÿ’‰ Payload Used

<script>alert('Stored XSS')</script>

๐Ÿ‘ฃ Steps to Reproduce

  1. Navigate to DVWA โ†’ Stored XSS module
  2. Enter attacker name and payload in message field
  3. Submit the form
  4. Reload the page or revisit as another user
  5. Observe JavaScript execution

๐Ÿ’ฅ Impact

๐Ÿงช Proof of Concept

The injected payload is stored in the application database and executed whenever the vulnerable page renders stored content.

Payload Injection

Payload Injection

JavaScript Execution Popup

XSS Popup

Stored Entries in Guestbook

Stored XSS Entries

๐Ÿ›ก Mitigation

๐Ÿง  Key Learning

Stored XSS is significantly more dangerous than reflected XSS because payloads persist in the application and affect every user who loads the page. Proper output encoding is critical to prevent injection attacks.

๐Ÿบ Personal Note

This lab demonstrates real-world persistent XSS behavior commonly seen in comment systems, ticketing portals, and admin dashboards. Understanding stored XSS is foundational for modern bug bounty hunting.