| name | wstg-clnt-01.1 |
| description | Testing for Self DOM-Based XSS |
| category | client-side |
| owasp_id | WSTG-CLNT-01.1 |
| version | 1.0.0 |
| author | cyberstrike-official |
| tags | ["client-side","javascript","dom","cors","wstg","clnt"] |
| tech_stack | [] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
wstg-clnt-01.1
Test ID
WSTG-CLNT-01.1
Test Name
Testing for Self DOM-Based XSS
High-Level Description
Self DOM-Based XSS (also called Self-XSS) occurs when users are tricked into executing malicious JavaScript in their own browser context. While the attack requires social engineering, it can still lead to session theft or account compromise if combined with other vulnerabilities.
What to Check
How to Test
Step 1: Check Console Protection
console.log("test")
eval("alert(1)")
Step 2: Test Input Field Exploitation
document.querySelector('input[type="text"]').value = "<script>alert(1)</script>"
Remediation
if (typeof console !== "undefined") {
.(, )
.(, )
.(, )
}