Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Testing for Self DOM-Based XSS
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | -16% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -8% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -18% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -72% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -26% | 0% |
WSTG-CLNT-01.1
Testing for Self DOM-Based XSS
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.
javascript// Open browser console on target site // Check if there's a warning message about pasting code // Sites like Facebook show: // "Stop! This is a browser feature intended for developers..." // Check if console commands are restricted console.log("test") eval("alert(1)")
javascript// Test if pasting scripts in input fields triggers execution // Some apps process pasted content unsafely // In browser console: document.querySelector('input[type="text"]').value = "<script>alert(1)</script>" // Check if it gets executed when form is submitted
javascript// Add console warning if (typeof console !== "undefined") { console.log("%cStop!", "color: red; font-size: 50px; font-weight: bold;") console.log("%cThis is a browser feature for developers.", "font-size: 20px;") console.log("%cIf someone told you to paste something here, it is likely a scam.", "font-size: 16px;") }
| Finding | CVSS | Severity | | ------------------- | ---- | -------- | | No self-XSS warning | 3.5 | Low |
[ ] Console protection checked
[ ] Self-XSS warnings present
[ ] Input field paste handling tested
[ ] Findings documentedOther measured skills in the registry, with their headline benchmark lift.