
Demonstration of CVE-2020-11023
This is a demonstration of reproducing CVE-2020-11023. Source is mainly from this blog post.
Install npm dependencies with npm install, jQuery 3.4.1 is included as a dependency. Run the project with for example live server for vs code.
The site contains two examples where an input is copied to a div. In the first div the value is copied straight away, and in the second jQuerys .html() function is used to set the content.
One of the examples mentioned in the blog post uses the code "> . Note the malicious looking title of the img-tag, this is still safe and will not execute code.
When using the second input and copying code, jQuery will parse it and do some string manipulation, resulting in two image tags where one of them includes the js-code inside the title.
<img src="https://raw.githubusercontent.com/andreassundstrom/cve-2020-11023-demonstration/main/x" onerror="alert(1)" />
Run npm install [email protected].