XSS_HTML Injection
What's XSS
Example For Vulnerable code
<!DOCTYPE html>
<html>
<body>
<?php
$txt = "PHP";
echo "I love $txt!";
?>
</body>
</html>Mitigation code
<!DOCTYPE html> <html> <body> <?php $txt = '"><script>alert(0)</script>'; echo htmlentities("I love $txt!"); ?> </body> </html><?php $str = "A 'quote' is <b>bold</b>"; // Outputs: A 'quote' is <b>bold</b> echo htmlentities($str); // Outputs: A 'quote' is <b>bold</b> echo htmlentities($str, ENT_QUOTES); ?>
XSS & HTMLI Testing Methodology
1) Find a reflection point
2) Get HTML injection
3) Get your event handler injected
4) Inject JS code
Payload list
polyglots
XSS Exploitation
DOM XSS
Check for Dom-XSS in Swagger-UI
Some Bypasses Techniques

https://user-images.githubusercontent.com/108616378/219940178-c7988e77-c51a-4e79-add2-e0b192d92e02.png
Top XSS reports from HackerOne:
Last updated
