{"id":"CVE-2026-55524","aliases":["CVE-2026-55524","GHSA-vg6p-v9vm-6fgj","PYSEC-2026-3904"],"related":[],"kind":"vulnerability","state":"published","title":"PraisonAI: SSRF in web_crawl tool via redirect-following and DNS rebinding (validate-then-fetch gap)","summary":"PraisonAI is a multi-agent teams system. In versions prior to 1.6.58, the web_crawl tool performs its SSRF check only on the initially supplied URL, allowing the protection to be bypassed so the tool connects to attacker-chosen internal destinations. The check resolves the hostname once with socket.gethostbyname and rejects private/loopback/link-local results, but then passes the URL to a fetcher using httpx.Client(follow_redirects=True) (or urllib.request.urlopen when httpx is absent, which also follows redirects) that re-resolves the hostname at connect time with no further validation. This validate-here/fetch-there gap is exploitable through both HTTP redirects and DNS rebinding. If an attacker can influence URLs passed to web_crawl(), directly or through an agent/tool workflow, they can cause the PraisonAI host to fetch loopback, private-network, or cloud metadata endpoints reachable from that host, with the response body returned in the web_crawl() result. This issue has been fixed in version 1.6.58.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"PraisonAI is a multi-agent teams system. In versions prior to 1.6.58, the web_crawl tool performs its SSRF check only on the initially supplied URL, allowing the protection to be bypassed so the tool connects to attacker-chosen internal destinations. The check resolves the hostname once with socket.gethostbyname and rejects private/loopback/link-local results, but then passes the URL to a fetcher using httpx.Client(follow_redirects=True) (or urllib.request.urlopen when httpx is absent, which also follows redirects) that re-resolves the hostname at connect time with no further validation. This validate-here/fetch-there gap is exploitable through both HTTP redirects and DNS rebinding. If an attacker can influence URLs passed to web_crawl(), directly or through an agent/tool workflow, they can cause the PraisonAI host to fetch loopback, private-network, or cloud metadata endpoints reachable from that host, with the response body returned in the web_crawl() result. This issue has been fixed in version 1.6.58.","source":"cvelist"},{"lang":"en","text":"The web_crawl tool performs its SSRF check only on the initial URL: it resolves the hostname once\nwith socket.gethostbyname and rejects private/loopback/link-local results. It then passes the URL to\na fetcher that uses httpx.Client(follow_redirects=True) - or urllib.request.urlopen when httpx is\nabsent, which also follows redirects - and re-resolves the hostname at connect time, with no further\nvalidation. This validate-here/fetch-there gap is bypassable two independent ways: HTTP redirects and\nDNS rebinding.\n\nAffected code: src/praisonai-agents/praisonaiagents/tools/web_crawl_tools.py\n- Single-shot validation (lines 229-238):\n    if os.environ.get(\"ALLOW_LOCAL_CRAWL\") != \"true\":\n        ip_str = socket.gethostbyname(hostname)            # resolved ONCE, at validation time\n        ip = ipaddress.ip_address(ip_str)\n        if ip.is_loopback or ip.is_private or ip.is_link_local or ip.is_multicast or ip.is_unspecified:\n            continue                                       # rejected\n    url_list.append(u)\n- Vulnerable fetch (_crawl_with_httpx, lines 142 / 149): follows redirects, re-resolves DNS, no re-check:\n    with httpx.Client(follow_redirects=True, timeout=30.0) as client: response = client.get(url)\n    # fallback: urllib.request.urlopen(url, timeout=30)  (also follows redirects by default)\n- web_crawl / crawl_web are registered tools (tools/__init__.py:156-157); httpx is the default fallback\n  provider (dispatch at web_crawl_tools.py:269).\n\nThe two bypasses:\n1) Redirect: validation approves an attacker domain resolving to a public IP; attacker server replies\n   302 Location: http://169.254.169.254/... (or any internal host); the fetcher follows it unchecked.\n2) DNS rebinding (TOCTOU): validator's gethostbyname and fetcher's connect-time resolution are\n   independent; a low-TTL attacker domain answers public to the validator and private/loopback to fetch.\n\nImpact:\nAn agent with web_crawl - driven by direct input or indirect prompt injection - can be made to read\ninternal-only HTTP services and cloud instance-metadata endpoints (e.g. IAM credentials), with the\nresponse body returned in the tool output. Scope is Changed because the request pivots into the\ninternal network.\n\nProof of concept:\nA PoC drives the real web_crawl() (httpx absent -> genuine urllib fallback). It runs a loopback\n\"internal metadata\" service and a loopback attacker redirector, substituting DNS only to stand in\nfor \"attacker owns a public domain\" / offline routing - the redirect-following and connect-time\nre-resolution are the repo's own behavior. Observed:\n  CONTROL: web_crawl(\"http://127.0.0.1:.../meta-data/\")  -> blocked (validator works)\n  PoC 1A (redirect):  attacker.example approved (public); 302 -> loopback metadata\n                      -> result.content leaks {\"AccessKeyId\":\"ASIA_FAKE_STOLEN_CREDENTIAL_...\"}\n  PoC 1B (rebinding): gethostbyname(rebind.example)->public (allowed); connect->127.0.0.1\n                      -> same secret leaked\nThe control proves the validator blocks a direct loopback request, so the bypasses are genuine.\n\nRemediation:\nResolve the hostname once, validate that IP, and connect to that exact validated IP (pin it) rather\nthan re-resolving. Disable redirect following (follow_redirects=False; for urllib use a redirect\nhandler that re-validates), or re-validate every redirect hop's resolved IP. Apply the deny check to\nboth the validator and the actual socket target. file_tools.py:364 already uses follow_redirects=False\nand is the correct pattern to propagate.\n\nDistinct from prior advisories:\nThe accepted SSRF advisories concern host-string parsing in different code — alternate loopback\nencodings in spider_tools (GHSA-5c6w-wwfq-7qqm) and the CLI @url feature (GHSA-5cxw-77wg-jrf3). This\nis in the web_crawl tool, which neither advisory names, and the mechanisms (redirect-following and DNS\nrebinding) differ categorically from host-string encoding; the spider_tools _host_is_blocked hardening\ndoes not apply to this tool.","format":"markdown","source":"ghsa"},{"lang":"es","text":"PraisonAI es un sistema de equipos multiagente. En versiones anteriores a la 1.6.58, la herramienta web_crawl realiza su verificación de SSRF solo en la URL suministrada inicialmente, permitiendo que la protección sea eludida para que la herramienta se conecte a destinos internos elegidos por el atacante. La verificación resuelve el nombre de host una vez con socket.gethostbyname y rechaza resultados privados/loopback/link-local, pero luego pasa la URL a un ’fetcher’ usando httpx.Client(follow_redirects=True) (o urllib.request.urlopen cuando httpx está ausente, que también sigue redirecciones) que vuelve a resolver el nombre de host en el momento de la conexión sin validación adicional. Esta brecha de validar aquí/obtener allá es explotable a través de redirecciones HTTP y DNS rebinding. Si un atacante puede influir en las URL pasadas a web_crawl(), directamente o a través de un flujo de trabajo de agente/herramienta, pueden hacer que el host de PraisonAI obtenga puntos finales de loopback, de red privada o de metadatos de la nube accesibles desde ese host, con el cuerpo de la respuesta devuelto en el resultado de web_crawl(). Este problema ha sido solucionado en la versión 1.6.58.","source":"nvd"}],"published":"2026-08-05T19:58:46.038Z","modified":"2026-10-24T16:10:00.153Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N","score":7.5,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-367","CWE-918"],"affected":[{"ranges":[{"version":"< 1.6.58","status":"affected"}],"vendor":"MervinPraison","product":"PraisonAI","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.6.58"}],"ecosystem":"PyPI","package":"praisonaiagents","purl":"pkg:pypi/praisonaiagents","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.6.58"}],"ecosystem":"PyPI","package":"praisonaiagents","purl":"pkg:pypi/praisonaiagents","source":"pysec"}],"references":[{"url":"https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-vg6p-v9vm-6fgj","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-55524","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/MervinPraison/PraisonAI/commit/2f9677abb2ea68eab864ee8b6a828fd0141612e1","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/MervinPraison/PraisonAI","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://github.com/MervinPraison/PraisonAI/releases/tag/v4.6.58","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/praisonaiagents","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-vg6p-v9vm-6fgj","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-08-06T14:41:35.294Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-55524","url":"https://www.cve.org/CVERecord?id=CVE-2026-55524","licence":"CVE Terms of Use","modified":"2026-08-06T14:43:50.259Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-vg6p-v9vm-6fgj","url":"https://github.com/advisories/GHSA-vg6p-v9vm-6fgj","licence":"CC-BY-4.0","modified":"2026-09-10T12:26:05.868Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-55524","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-55524","licence":"Public domain","modified":"2026-10-24T16:10:00.153Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-3904","url":"https://osv.dev/vulnerability/PYSEC-2026-3904","licence":"CC-BY-4.0","modified":"2026-09-10T12:15:11.255Z"}],"updatedAt":"2026-11-25T22:59:31.180Z","epss":{"score":0.00235,"percentile":0.15531,"date":"2026-12-01T12:00:22.000Z"}}