Back to skill

Security audit

SearXNG Docker

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent local SearXNG search skill, with normal search-related network use, though it starts a persistent Docker service and uses an unpinned container image.

Install only if you are comfortable running a local Dockerized SearXNG service. Pin the container image to a reviewed version or digest before production use, remember that searches may still reach configured upstream engines, and stop the Docker service when you no longer need it.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Warning
Location
docker/docker-compose.yml:5
Finding

Unpinned Mutable Container Image

Content
View full analysis

Vulnerability Details

File Location: docker/docker-compose.yml, line 5
Vulnerability Type: Supply-chain risk from a mutable container image tag
Risk Level: Medium

Vulnerable Code

yaml
services:
  searxng:
    image: searxng/searxng:latest

Technical Analysis

The deployment uses the mutable latest tag rather than a reviewed version and immutable image digest. Consequently, the image executed by a future deployment may differ from the image that was available during this audit. The effective code can change without any modification to this repository.

An upstream compromise, registry-account compromise, or unexpected image update could therefore cause arbitrary altered container code to run when the image is pulled. This is a supply-chain weakness rather than evidence that the current upstream image is malicious.

The container is hardened by dropping all Linux capabilities and restoring only CHOWN, SETGID, and SETUID. Its configuration mount is read-only, and port 8888 is published only on loopback. These controls reduce but do not eliminate the risk: the container retains outbound network access and executes code locally with the three restored capabilities inside its container boundary.

Attack Path

  1. An attacker compromises the upstream image publication channel, or an unreviewed upstream release is assigned to searxng/searxng:latest.
  2. A user runs docker compose -f docker/docker-compose.yml up -d, or otherwise pulls the mutable tag.
  3. Docker resolves latest to the changed image without repository-level integrity pinning.
  4. The altered entry point and application code execute inside the container.
  5. Malicious code could use the container's outbound network access, inspect its runtime environment and mounted SearXNG configuration, or abuse vulnerabilities in the container runtime or host kernel. Host compromise would require an additional container-escape or runt ...[truncated 782 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace latest with a reviewed release and immutable digest:

    yaml
    services:
      searxng:
        image: searxng/searxng:<reviewed-version>@sha256:<verified-digest>
    
  2. Obtain the digest from a trusted registry source and verify image provenance or signatures where supported.

  3. Introduce an explicit update process that reviews release notes, scans the candidate image, tests it in an isolated environment, and then updates the pinned digest.

  4. Enable automated monitoring for vulnerabilities affecting the pinned image, while keeping upgrades subject to review.

  5. Continue using the existing loopback binding, read-only mount, and capability restrictions. Consider additionally enabling security_opt: ["no-new-privileges:true"], a read-only root filesystem where compatible, resource limits, and outbound-network restrictions appropriate to the required search engines.

Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (5)

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 · SKILL.md (reported line 31)May include surrounding context.

docker compose -f docker/docker-compose.yml up -d

3. Verify

curl -s "http://127.0.0.1:8888/search?q=test&format=json" | python3 -m json.tool | head -5

text

### Configuration

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill clearly enables network-capable behavior through a local SearXNG service and search script, but it does not declare any explicit tool scope such as permissions or allowed-tools. That mismatch can lead to under-scoped review, unintended tool access, or deployment in environments where network use should have been explicitly approved.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger guidance is broad enough that the skill may activate for many generic requests to search or look something up, increasing the chance of unintended invocation. When a skill performs network-backed actions, overbroad activation can expose user queries externally or bypass a more appropriate built-in tool path.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The 'When to Use' section uses broad and somewhat ambiguous conditions like generic search phrases and 'web_search unavailable or returns poor results' without clear gating. In an agent setting, ambiguous activation increases the risk of the skill being selected unexpectedly and sending prompts or sensitive search terms over the network.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script emits user-facing strings in Chinese (for example, the search heading and result count) while the rest of the interface and help text are in English. This creates a language/locale policy issue because the skill forces a specific output language without user opt-in or a clearly documented regional justification.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.