Client-side prototype pollution → XSS: 1⃣ heuristic scan for PP 2⃣ fingerprints known gadgets 3⃣ prints the XSS payload Ever found PP in the wild? 👇 https://github.com/kleiton0x00/ppmap #bugbounty #bugbountytips #infosec #cybersecurity #xss #pentesting
<div class='x<img src=x onerror=alert(document.domain)>'></div>
Parameter analysis + XSS scanning in one tool: cat urls.txt | dalfox pipe https://t.co/tIZZjdAQAE #bugbounty #xss #bugbountytips
When testing an API, look for API documentation pages that may be vulnerable to XSS. Check if the page uses template strings to build HTML, with values from the OpenAPI spec dropped inside, such as content="${something}" or <title>${something}</title>. Try setting the description
Test template fields for stored cross-site scripting by submitting content with HTML markup, such as a link or text with angle brackets, and checking if it is executed in the context of a higher-privileged viewer. Try storing a template that contains angle brackets <> and confirm
When a target uses a global regex (/g flag) to validate user input, try sending a large string with a disallowed character at the end to offset the lastIndex property. Then, send a second payload with the malicious input, which may be processed without being blocked by the regex.
Try sending a Location header with a crafted link to target.com to see if it reflects and executes code. If the response redirects to a page that auto-submits a form, it may be vulnerable to XSS. Look for a response that executes code without requiring user interaction. You can…
Try injecting payloads in the location.search parameter to test for DOM XSS vulnerabilities in innerHTML sinks. This works because user-controlled input in the URL query string can be reflected in the page's DOM. To confirm, look for your payload being executed in the page's con…
When testing API documentation tools, look for renderers that convert Markdown to HTML. Check if the renderer allows raw HTML in the input by searching for html: true in the code. Then, verify if the HTML output is properly sanitized. If not, it may be possible to inject malicio…
When a target uses DOMPurify for sanitization, look for custom hooks that may introduce vulnerabilities. Check the uponSanitizeAttribute, uponSanitizeElement, and afterSanitizeAttributes hooks for potential bypasses. Test for namespace confusion and attribute smuggling by inject…
When a web application uses Blob URLs, test if you can recover the origin by copying and pasting the URL into a new tab. If the window.origin changes from 'null' to the application's origin, you may be able to execute arbitrary JavaScript on that origin. To automate this, use Ja…
How -> 1. Collaborator hides HTML in an attachment attribute 2. Admin opens the edit form, editor normalizes it 3. Legacy code writes attacker HTML via innerHTML Fix -> sanitize after normalizing #bugbountytips pic.tw…
Cross-site scripting (XSS): how to hunt it
Where to look
- Every parameter, header and path segment that comes back in the response, and where it lands: HTML, an attribute, a script or a URL.
- Client-side sinks such as innerHTML, document.write and location, fed by the URL fragment, postMessage or storage.
- Rich text, Markdown, SVG and file names that are stored and shown to other users.
- Filters and sanitisers you can get around with another context, another encoding or a parser difference.
What proves it
Show script running in the target’s origin on a test account of your own, such as reading a value only that user can see, say who sees the payload, and keep stored payloads harmless.
Read further
Writeups on Cross-site scripting (XSS), by hunters and researchers, most with a short summary.
Related classes