Unsanitized input from data from a remote resource flows into innerHTML, where it is used to dynamically construct the HTML page on client side. This may result in a DOM Based Cross-Site Scripting attack
(reported in this repo as it is unreleased code following the advice of JSST)
Labels |
Added:
?
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-06-09 12:59:49 |
Closed_By | ⇒ | brianteeman |
Could use
But, there's a catch, the
message
needs to be html not plain text (I have no clue what the message could be just by looking at the code). It could be mitigated with something like:IF there's a possibility the message to be plain text)
Also this needs to be applied in all the instances of
innerHTML
were the data could be manipulated (eg server response, etc)