DEV Community

Cover image for TryHackMe: DOM-Based XSS
Sean Lee
Sean Lee

Posted on

TryHackMe: DOM-Based XSS

Which sinks can lead to DOM-XSS vulnerabilities?

The following are some of the main sinks that can lead to DOM-XSS vulnerabilities:

document.write()
document.writeln()
document.domain
element.innerHTML
element.outerHTML
element.insertAdjacentHTML
element.onevent
Enter fullscreen mode Exit fullscreen mode

The following jQuery functions are also sinks that can lead to DOM-XSS vulnerabilities:

add()
after()
append()
animate()
insertAfter()
insertBefore()
before()
html()
prepend()
replaceAll()
replaceWith()
wrap()
wrapInner()
wrapAll()
has()
constructor()
init()
index()
jQuery.parseHTML()
$.parseHTML()
Enter fullscreen mode Exit fullscreen mode

Top comments (0)