Cross-site scripting (XSS) is an attempt to insert malicious markup or untrusted data into values or results that are subsequently…