Large-Scale Annotated Dataset for Cross-Site Scripting (XSS) Attack Detection

Published: 8 July 2026| Version 1 | DOI: 10.17632/py6cnbgdh2.1
Contributors:
,
,

Description

This dataset contains 1,831,254 records specifically curated to support research on detecting Cross-Site Scripting (XSS) attacks using machine learning techniques. Each record consists of two fields: Query: A text input representing potential web payloads, user inputs, or script content extracted from diverse sources of benign and malicious web traffic. Label: A binary classification label indicating whether the entry is malicious (1) or benign (0). The dataset is heavily diversified and deduplicated to ensure minimal bias and high generalization capacity for model training. It features a malicious-to-benign ratio of approximately 60:40, making it particularly suitable for evaluating both detection and false positive rates of machine learning and deep learning models. This dataset underpins the research paper “Bi-LSTM Approach for Cross-Site Scripting (XSS) Attack Detection” submitted to the International Conference on Computer and Information Technology (ICCIT), Cox’s Bazar. The data can be used to benchmark traditional models (logistic regression, random forest, naive Bayes, decision tree, XGBoost) alongside advanced sequence models such as Bi-LSTM to exploit contextual dependencies in payload patterns. If u find this dataset useful dont forget to cite https://ieeexplore.ieee.org/document/11491109 Key Features: Total Records: 1,831,254 Benign Records (Label = 0): 666,484 Malicious Records (Label = 1): 1,164,770 Structure: Two columns – “Query” (textual payload) and “Label” (binary indicator: 1 = malicious, 0 = benign). Diversity: Collected from a broad range of benign and malicious payload sources to ensure high variability. Preprocessing: Cleaned, normalized, and deduplicated to eliminate redundant patterns. Intended Use: Training and evaluation of machine learning models for XSS detection, adversarial pattern recognition, and other web security research tasks. This dataset is valuable for cybersecurity practitioners, researchers, and academic institutions focusing on web application security, adversarial input detection, and real-time intrusion prevention systems.

Files

Institutions

Categories

Cybersecurity

Licence