# CVE-2026-5631: assafelovic gpt-researcher RCE in WebSocket endpoint

Source: https://junglewise.ai/threats/cve-2026-5631-assafelovic-gpt-researcher-rce-in-websocket-endpoint  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-06. Updated: 2026-07-24  
License: CC BY 4.0 with a link back

CVE-2026-5631 · Severity: high · CVSS 7.3 · Published 2026-04-06

gpt-researcher is an autonomous AI agent used for conducting deep research. A critical security flaw allows an unauthenticated attacker to remotely execute arbitrary commands on the server hosting the application. This could lead to a total system takeover, theft of sensitive research data, or the use of the server as a foothold for further attacks on the corporate network.

Technologies: [Assaf Elovic GPT Researcher](https://junglewise.ai/threats/technologies/gpt-researcher). Vendors: [Assaf Elovic](https://junglewise.ai/threats/vendors/assaf-elovic).

## Quick answers

**Is CVE-2026-5631 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-5631 being exploited in the wild.

**How severe is CVE-2026-5631?** High severity, with a CVSS score of 7.3, published 6 April 2026.

**Which products and versions are affected?** Assaf Elovic GPT Researcher <= 3.4.3.

**Is there a fix for CVE-2026-5631?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-5631 attacked?** It is attacked over the network, in a network appliance.

**Am I affected by CVE-2026-5631?** Check whether you run Assaf Elovic GPT Researcher at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A command injection vulnerability exists in the `extract_command_data` function within `backend/server/server_utils.py` of gpt-researcher. The application fails to validate or sanitize the `mcp_configs` parameter received via the unauthenticated `/ws` WebSocket endpoint. An attacker can provide a malicious `command` and `args` array which is eventually passed to `anyio.open_process()` through the Model Context Protocol (MCP) client subsystem. This allows for arbitrary OS command execution with the privileges of the application process. As of the advisory date, the vulnerability remains unpatched.

## Affected products

- assafelovic gpt-researcher <= 3.4.3

## Timeline

- 2026-03-19: disclosed: Vulnerability discovered and reported via GitHub issue
- 2026-04-06: advisory: Initial disclosure by VulDB/NVD

## References

- [https://github.com/assafelovic/gpt-researcher/](https://github.com/assafelovic/gpt-researcher/)
- [https://github.com/assafelovic/gpt-researcher/issues/1694](https://github.com/assafelovic/gpt-researcher/issues/1694)
- [https://vuldb.com/submit/785858](https://vuldb.com/submit/785858)
- [https://vuldb.com/vuln/355419](https://vuldb.com/vuln/355419)
- [https://vuldb.com/vuln/355419/cti](https://vuldb.com/vuln/355419/cti)

## Related threats

- [assafelovic GPT Researcher command injection in MCP STDIO](https://junglewise.ai/threats/cve-2025-65720-assafelovic-gpt-researcher-command-injection-in-mcp-stdio)
- [assafelovic gpt-researcher SSRF in ws Endpoint](https://junglewise.ai/threats/cve-2026-5633-assafelovic-gpt-researcher-ssrf-in-ws-endpoint)
- [assafelovic gpt-researcher missing authentication in REST API and WebSockets](https://junglewise.ai/threats/cve-2026-5632-assafelovic-gpt-researcher-missing-authentication-in-rest-api-and)
- [assafelovic gpt-researcher XSS in Report API](https://junglewise.ai/threats/cve-2026-5630-assafelovic-gpt-researcher-xss-in-report-api)
- [assafelovic gpt-researcher XSS in WebSocket Interface](https://junglewise.ai/threats/cve-2026-5625-assafelovic-gpt-researcher-xss-in-websocket-interface)
