Back to skill

Security audit

searxng-web-search

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent SearXNG search wrapper, but its setup examples can expose a persistent search service with weak secrets and unpinned dependencies.

Review before installing. If you use this skill, bind SearXNG to `127.0.0.1`, avoid exposing port 8080 to untrusted networks, enable rate limiting or put it behind authenticated access, generate a real unique secret key, pin the Docker image and dependencies, and avoid sending secrets or private data as search queries.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
references/REFERENCE.md:7
Finding

Predictable SearXNG Secret Caused by Quoted Heredoc

Content
View full analysis
searxng/settings.yml << 'EOF' use_default_settings: true server: secret_key: "$(openssl rand -hex 32)" bind_address: "0.0.0.0" port: 8080 limiter: false image_proxy: true search: safe_search: 0 default_lang: "all" formats: - html - json EOF ``` ### Technical Analysis The heredoc delimiter is single-quoted (`<< 'EOF'`), which disables shell expansion throughout the heredoc. Consequently, `$(openssl rand -hex 32)` is not executed. The generated `settings.yml` contains the literal, publicly documented value: ```yaml secret_key: "$(openssl rand -hex 32)" ``` This results in every deployment following these instructions receiving the same predictable secret rather than a cryptographically random value. Security controls that depend on the SearXNG server secret may therefore operate with a known key. ### Attack Path 1. An administrator follows the documented quick-deployment procedure. 2. The quoted heredoc writes the literal command substitution into `settings.yml`. 3. The SearXNG container starts with the predictable, publicly known secret. 4. An attacker who can reach the instance identifies that it was deployed using this guide. 5. The attacker uses knowledge of the secret when targeting server functionality whose integrity depends on that key. The exact exploitable server operations depend on the installed SearXNG version and how it uses `server.secret_key`, but the secret cannot be treated as confidential or deployment-specific. ### Impact Assessment The issue does not directly grant host or container privileges. It weakens application-level trust boundaries by deploying a known server secret. Potentially affected scope includes sessions, signed values, request-integrity controls, or other SearXNG features that derive securit ...[truncated 26 chars]
Remediation
View remediation
&2 exit 1 } cat > searxng/settings.yml << EOF use_default_settings: true server: secret_key: "$SECRET_KEY" bind_address: "0.0.0.0" port: 8080 limiter: true image_proxy: true search: safe_search: 0 default_lang: "all" formats: - html - json EOF ``` Alternatively, retain a quoted heredoc with a conspicuous placeholder and add a separate, validated replacement operation. The deployment procedure should fail if the resulting value is empty, unchanged, or equal to a documented placeholder. Restrict the resulting configuration file to the service owner where supported. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
references/REFERENCE.md:14
Finding

Unrestricted SearXNG Service Exposed on All Host Interfaces

Content
View full analysis
Remediation
View remediation
``` Additional hardening measures: 1. Enable the SearXNG limiter by default: ```yaml server: limiter: true ``` 2. If remote access is necessary, place the service behind an authenticated TLS reverse proxy and permit only trusted clients or networks. 3. Apply host firewall rules that deny unsolicited access to port 8080. 4. Correct the misleading localhost comment or change the value and deployment architecture so that it is accurate. 5. Document that disabling the limiter is appropriate only when another trusted access-control and rate-limiting layer exists. 6. Avoid exposing `/config` and the JSON API to untrusted networks where the deployment does not require them. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
assets/settings.example.yml:2
Finding

Copy-Ready Configuration Contains a Fixed Placeholder Secret

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
README.md:23
Finding

Mutable and Unpinned Third-Party Dependencies

Content
View full analysis
Remediation
View remediation
python -m pip install "requests==" ``` Pin the container by both version and immutable digest: ```bash docker pull searxng/searxng:@sha256: docker run ... searxng/searxng:@sha256: ``` Further hardening should include: 1. Add a Python requirements or lock file with hashes. 2. Record the reviewed npm package version and integrity metadata. 3. Use an automated dependency-update process that tests and reviews version changes. 4. Verify container signatures or provenance where supported. 5. Avoid administrative installation privileges unless required. 6. Document a controlled upgrade procedure rather than instructing users to consume `latest`. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (11)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · references/REFERENCE.md (reported line 55)May include surrounding context.

bash
# Should return JSON results (not HTML or 403)
curl -s 'http://localhost:8080/search?q=test&format=json' | python3 -m json.tool | head -20

If you get 403 Forbidden, JSON format is not enabled in settings.yml.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill clearly requires network access and reads configuration from environment variables, but it does not declare any tool scope, permissions, or allowed-tools boundary in the manifest. That omission weakens least-privilege controls and makes it easier for a hosting agent platform to invoke the skill without clear operator awareness of its external connectivity and env usage.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description uses very broad triggers such as 'search the web', 'research a topic', and 'gather external context', which can cause overly eager invocation. In an agent setting, this increases the chance that sensitive prompts or user data are sent externally when a local answer would have sufficed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill documentation does not prominently warn that user queries are transmitted over the network to a SearXNG instance, potentially self-hosted or remote. Without that disclosure, users and operators may unknowingly expose sensitive prompts, search terms, or internal context to external infrastructure and logs.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

The quick-start command pulls searxng/searxng:latest, which is mutable and can change over time. This creates supply-chain and reproducibility risk because users may run an unexpected image version, including one with newly introduced vulnerabilities or malicious compromise if the registry artifact is ever replaced.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The example configuration claims private or localhost-only binding, but sets bind_address to 0.0.0.0, which exposes the SearXNG service on all network interfaces. In the context of an agent-facing search API with rate limiting disabled and JSON API enabled, this increases the chance of unintended external access, abuse, or information leakage if deployed as copied.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The example binds SearXNG to 0.0.0.0, exposing the service on all network interfaces, and the docs do not warn users that this may make the instance reachable from other hosts. In a self-hosted search service, unintended exposure can enable unauthorized access, metadata leakage, and abuse of the instance as an open proxy-like search endpoint.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README describes a web search capability but does not clearly warn that user prompts and search queries are sent over the network to the configured SearXNG instance, and may then be forwarded by that instance to upstream search engines. In an agent context, users may assume local processing, so missing disclosure can cause unintended transmission of sensitive prompts, credentials, proprietary code fragments, or personal data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The sample settings set safe_search: 0, which explicitly turns off search-result filtering, but the document does not warn users that this may return unrestricted or inappropriate content. In markdown guidance, omitting that disclosure can leave users unaware of the behavior change.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.