Back to skill

Security audit

Elasticsearch Openclaw

Security checks for vulnerabilities and agentic risk

Overview

The skill is documentation-only and appears service-focused, but it claims to be read-only while giving copyable Elasticsearch write and admin setup commands.

Review before installing. Use only a narrowly scoped read-only Elasticsearch API key in the agent workspace, and do not broaden that key to make setup examples work. Treat index creation, ingestion, inference endpoint setup, pipeline creation, API-key creation, and cluster-setting changes as separate administrator tasks with short-lived credentials outside the normal agent environment.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (2)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/semantic-search.md:9
Finding

Read-only security claim conflicts with documented write and administrative operations

Content
View full analysis
Read-only Elasticsearch 9.x reference for AI-orchestrated search and analytics. SECURITY: This skill provides documentation for read-only operations only (search, aggregations, analytics). No write/update/delete operations are included. ``` It recommends a narrowly scoped API key: ```markdown - Scope API keys to specific indices and minimal privileges - For read-only OpenClaw access: `privileges: ["read", "view_index_metadata"]` ``` ```json POST /_security/api_key { "name": "openclaw-readonly", "role_descriptors": { "reader": { "indices": [{ "names": ["my-index"], "privileges": ["read"] }] } } } ``` However, the referenced setup instructions create an index and index a document: ```json PUT my-index { "mappings": { "properties": { "title": { "type": "text" }, "content": { "type": "text" }, "semantic_content": { "type": "semantic_text", "inference_id": "my-inference-endpoint" } } } } ``` ```json POST my-index/_doc { "title": "Fresh Broccoli", "content": "Nutritious green broccoli, rich in vitamins.", "semantic_content": "Fresh Broccoli Nutritious green broccoli, rich in vitamins. vegetables" } ``` They also create an inference endpoint containing an external-service credential: ```json PUT _inference/text_embedding/jina-embeddings-v3 { "service": "jinaai", "service_settings": { "api_key": "jina_xxxxxx", "model_id": "jina-embeddings-v3" } } ``` The vector-search reference creates another index, installs an ingest pipeline, and indexes a document through that pipeline ...[truncated 3835 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
references/python-client-9.md:6
Finding

Python dependencies are installed with an unbounded future version range

Content
View full analysis
=9.0.0" python-dotenv ``` ``` ### Technical Analysis The installation command supplies only a lower bound for `elasticsearch` and does not pin `python-dotenv` at all. Consequently, the command can resolve to package versions and transitive dependency trees published after this skill was reviewed, including a future incompatible major release. No lock file, package hashes, reviewed constraints file, or explicit package index is provided. Python package installation and later imports execute code from the resolved packages under the invoking user's account. If an upstream package or dependency is compromised, or if a future release becomes unsafe or incompatible, following this instruction exposes the environment to code that was not part of the audited artifact. The audit did not identify a typosquatted package name or a currently malicious dependency. The risk arises from non-reproducible, unbounded dependency resolution. ### Attack Path 1. A user follows the documented `pip install` command. 2. `pip` queries its configured package index and resolves the newest versions satisfying the broad constraints. 3. A future release or altered transitive dependency that was not reviewed with this skill is selected. 4. Installation hooks, imported package code, or vulnerable runtime behavior executes under the user's privileges. 5. In an OpenClaw or development environment, that code may access files, environment variables, network connectivity, and Elasticsearch credentials available to the Python process. ### Impact Assessment Successful supply-chain compromise could obtain the privileges of the user running `pip` or the resulting Python client. Depending on the environment, accessible assets could include: - ...[truncated 378 chars]
Remediation
View remediation
=9.0.0,<10.0.0`. 2. Pin `python-dotenv` to a reviewed version rather than installing the latest release implicitly. 3. Provide a lock or constraints file containing exact versions and cryptographic hashes. 4. Recommend installation with hash verification, such as `pip install --require-hashes -r requirements.txt`. 5. Specify the trusted package index and warn users against unreviewed extra indexes. 6. Install dependencies inside a dedicated, non-privileged virtual environment rather than the system Python environment. 7. Periodically update and re-audit pinned dependencies instead of relying on an unlimited range. 8. Run dependency vulnerability scanning against the locked dependency set before publishing new skill versions. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (10)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/python-client-9.md (reported line 138)May include surrounding context.

md
from dotenv import load_dotenv
import os

load_dotenv()  # loads from .env in current directory

ES_URL    = os.getenv("ELASTICSEARCH_URL")
ES_APIKEY = os.getenv("ELASTICSEARCH_API_KEY")

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file is presented as a read-only Elasticsearch reference, but it includes PUT my-index and POST my-index/_doc, which are write operations that create mappings and index documents. In an AI-orchestrated setting, this mismatch can cause an agent or user to perform state-changing actions under the false assumption that the skill is strictly read-only.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill is explicitly described as read-only, but this section includes a PUT my-index example that creates an index and mapping, which is a write/admin operation. In an AI-orchestrated setting, documentation that contradicts the declared safety boundary can cause an agent to issue unauthorized state-changing requests, undermining least-privilege assumptions and potentially enabling broader misuse if copied into execution flows.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This section includes ingest pipeline creation and document indexing (PUT _ingest/pipeline and POST my-index/_doc), both of which are write operations that directly contradict the skill's claim that no write/update/delete operations are included. Because the examples are concrete and copyable, an agent or user relying on the read-only classification could be induced to perform cluster-modifying actions, including data ingestion and pipeline changes.

Content

No source excerpt is available for this finding.

Behavior Manipulation

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Subtle instructions detected that may alter agent decision-making or introduce hidden biases.

Content

Scanner excerpt · SKILL.md (reported line 90)May include surrounding context.

md
## Security Best Practices

- Always use API keys over username/password
- Scope API keys to specific indices and minimal privileges
- For read-only OpenClaw access: `privileges: ["read", "view_index_metadata"]`
- Store credentials in `.env`, never hardcode in scripts

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file opens with a read-only assurance, but later content provides instructions that modify cluster state or support write workflows. This inconsistency is dangerous because safety claims may cause downstream agents to trust the document and overlook state-changing commands embedded later in the reference.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Although the skill is described as read-only, this section includes operational guidance for changing cluster settings and index behavior, such as resetting a read-only block and disabling refresh during indexing. In an AI-orchestrated environment, that contradiction can cause an agent or user to attempt state-changing administrative actions that exceed the documented safety boundary.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The guidance to reset cluster.blocks.read_only_allow_delete is a live cluster-setting modification, yet it appears without operational warnings, privilege expectations, or impact notes. In practice, this could prompt an agent or operator to alter production cluster protections as a routine troubleshooting step, potentially masking disk-pressure issues or changing system safeguards unexpectedly.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest claims read-only scope, yet this section documents inference endpoint creation and broader configuration guidance, including PUT _inference/.... That exceeds least-privilege/read-only boundaries and could lead an automated agent to modify cluster configuration or request elevated credentials.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documentation includes credentialed external-service configuration with an inline api_key field for JINA in a skill that is supposed to be read-only search guidance. Even though the key is a placeholder, showing credential injection and external outbound inference setup can normalize unsafe secret handling and prompt agents to solicit, store, or transmit real credentials to third-party services.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.