Assafelovic GPT-Researcher Stored Cross-Site Scripting Vulnerability in Report API

Vulnerability

A stored cross-site scripting vulnerability has been identified in Assafelovic GPT-Researcher versions through 3.4.3. The issue resides in the Report API, specifically within the file backend/server/app.py. This vulnerability allows an attacker to inject arbitrary HTML and JavaScript into research reports via the unauthenticated POST and PUT endpoints of the Report API. The injected payload is stored on the server and rendered unsanitized in the Next.js frontend, executing the attacker's JavaScript in the victim's browser.

Impact

Exploitation of this vulnerability allows for stored cross-site scripting, where injected scripts are executed in the context of the user viewing the report. This could lead to session hijacking, report tampering, and potentially spreading the XSS vulnerability to other users.

Reproduction

To reproduce this vulnerability, use the unauthenticated POST /api/reports endpoint to inject an XSS payload into the orderedData field. The payload will be stored and can be executed by navigating to the corresponding report URL.

Remediation

Sanitize input on the backend before storing reports, enable sanitization in the frontend when rendering markdown, and consider adding authentication to the Report API.

Added: Apr 6, 2026, 7:23 AM
Updated: Apr 6, 2026, 7:23 AM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
1.7
exploitability
7.7
remediation
0.0
relevance
5.3
threat
6.4
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.