mozilla / scanjs

[DEPRECATED] Static analysis tool for javascript code.
Other
429 stars 38 forks source link

[testing][false negative] - building HTML from innerHTML static strings #74

Closed pwnetrationguru closed 3 years ago

pwnetrationguru commented 10 years ago

Relating to our action attribute rule, ScanJS misses:

var a=document.createElement("div");
a.innerHTML="<form action='demo.asp'></form>";
document.body.appendChild(a);

We do not flag this because innerHTML is assigned from a static string.

We should flag this because we are building a <form> with the action attribute.