Cross Site Scripting (XSS) attacks are a type of injection attack, where scripts are injected into a…