XSS is a very commonly exploited vulnerability type that is very widely spread and easily detectable, and also it is…