Reinforcing Web Application Security: Innovative Techniques To Prevent Xss Attacks
Aisha Naomi Clarke
Bristol Waste Company, Albert Road, Bristol BS2 0XS, United Kingdom
Abstract
With the increasing reliance on web applications, the frequency and sophistication of cyber threats have grown significantly. Among these, Cross-Site Scripting (XSS) attacks remain one of the most prevalent and damaging forms of web-based vulnerabilities. XSS attacks occur when malicious actors exploit weaknesses in a website or web application by injecting unauthorized scripts, which are then executed in the browsers of unsuspecting users. These scripts can be used to steal sensitive data, hijack sessions, or plant harmful cookies, thereby compromising both the application and its users.
This study explores the mechanics and implications of XSS attacks and proposes advanced cybersecurity approaches for their detection and prevention. Specifically, it evaluates the effectiveness of the Deep Forest (DF) machine learning model alongside other artificial intelligence techniques in mitigating XSS vulnerabilities. The analysis highlights the importance of addressing class imbalance — a commonly overlooked issue in prior XSS research — which can significantly affect the accuracy and reliability of detection models.
Results demonstrate that the DF model is particularly effective in improving detection rates in imbalanced datasets, offering a more robust solution to the XSS problem. The study concludes by emphasizing the need for continued research on AI-driven cybersecurity models, especially those that address class imbalance, to enhance global preparedness against emerging web-based threats