DOM Clobbering Websites - Micro Benchmarks - 1

Description: Explore how DOM properties can be manipulated for benchmark testing in browser environments.

Source:

Type: DOC-TYPE-2

Code:

document.currentScript.src

Sink:

Type: XSS

Code:

document.createElement('script').src

Testing Code:

* @Name: currentScript.js
 * @SourceType: DOC-TYPE-2
 * @SourceCode: document.currentScript.src
 * @SinkType: XSS
 * @SinkCode: document.createElement('script').src
 */

let scriptEle = document.createElement('script');
let baseURL = document.currentScript.src;
scriptEle.src = baseURL;
document.body.appendChild(scriptEle);

Other Tests