Back to skill

Security audit

Moltbook Engagement

Security checks for vulnerabilities and agentic risk

Overview

The skill is a real Moltbook engagement toolkit, but it needs Review because it can change a social account and sends an optional Redis password to a hard-coded plaintext endpoint.

Install only if you are comfortable giving this skill authority to post, comment, upvote, follow/unfollow, and read Moltbook account data. Do not set REDIS_PASSWORD unless the Redis destination is fixed to a trusted TLS-protected server; as shipped, the code can send that password to 10.0.0.120:6379 in plaintext. Prefer using dry runs or manual review before public account-changing actions, and treat OPENAI_API_KEY as enabling third-party processing of verification challenge text.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/moltbook-post.py:151
Finding
Redis Password Transmitted in Plaintext to a Hard-Coded Network Endpoint<![CDATA[ ## Vulnerability Details **File Location**: `scripts/moltbook-post.py`, lines 151–153 and 196–241 **Vulnerability Type**: Plaintext credential transmission to a hard-coded endpoint **Risk Level**: High ### Vulnerable Code ```python # --- Redis Rate Limiting --- REDIS_HOST = "10.0.0.120" REDIS_PORT = 6379 def REDIS_PASSWORD(): return _get("REDIS_PASSWORD", required=False) or "" ``` The password is subsequently transmitted through a raw, unencrypted TCP socket: ```python sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.settimeout(3) sock.connect((REDIS_HOST, REDIS_PORT)) def send_cmd(parts): data = f"*{len(parts)}\r\n".encode('utf-8') for p in parts: encoded = str(p).encode('utf-8') data += f"${len(encoded)}\r\n".encode('utf-8') + encoded + b"\r\n" sock.sendall(data) def read_line(): line = b"" while True: byte = sock.recv(1) if not byte: break if byte == b'\r': next_byte = sock.recv(1) if next_byte == b'\n': break line += byte + next_byte else: line += byte return line def read_resp(): first = sock.recv(1) if first == b'+': return read_line().decode('utf-8') elif first == b':': return int(read_line()) elif first == b'$': length = int(read_line()) if length == -1: return None data = sock.recv(length) sock.recv(2) return data.decode('utf-8') elif first == b'-': error = read_line().decode('utf-8') raise Exception(f"Redis error: {error}") return None # Authenticate send_cmd(["AUTH", REDIS_PASSWORD()]) auth_resp = read_resp() ``` Equivalent plaintext authentication behavior is repeated in `redis_mark_posted` and `redis_check_ratelimit`. ### Technical Analysis The script retrieves `REDIS_PASSWORD` from the process environment or the workspace-level `.secrets-cache.json` file. It then ...[truncated 2596 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Remove the hard-coded endpoint** - Do not ship a fixed Redis host in the Skill. - Require an explicit `REDIS_URL` or equivalent configuration supplied by the user. - Keep Redis integration disabled unless the user affirmatively configures it. 2. **Require encrypted transport** - Support only TLS-protected Redis connections, such as `rediss://`. - Validate the server certificate and hostname. - Do not permit silent downgrade to plaintext TCP when credentials are configured. 3. **Use a maintained Redis client** - Replace the custom socket-level RESP implementation with a reputable Redis library that supports TLS, authentication, connection cleanup, and robust protocol parsing. - Pin and audit the dependency if one is introduced. 4. **Constrain secret loading** - Read only the specific credential required for an explicitly configured Redis endpoint. - Avoid automatically sourcing unrelated workspace-wide secret caches. - Do not transmit any credential until the user-configured destination has been validated. 5. **Fail safely** - If Redis is unavailable or not configured, use local deduplication without making an outbound connection. - Do not fail open for security-sensitive rate-limit or deduplication decisions without clearly informing the user. 6. **Protect credentials operationally** - Use a dedicated, unique Redis account or ACL user with access only to the required key namespace. - Rotate any Redis password that may already have been transmitted by this implementation. - Prohibit credential reuse across Redis instances or unrelated services. 7. **Improve disclosure and consent** - Document the exact destination, data transmitted, TLS requirements, and circumstances under which Redis is contacted. - Provide a dry-run or diagnostic command that displays the destination without exposing the credential. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (36)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The skill description omits material behaviors such as OpenAI fallback use, follow/unfollow actions, and profile fetching while also overstating other features. Undeclared network destinations and account-affecting actions reduce informed consent and can cause users or agents to perform external calls and account modifications they did not expect.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding
The skill description omits material behaviors such as OpenAI fallback use, follow/unfollow actions, and profile fetching while also overstating other features. Undeclared network destinations and account-affecting actions reduce informed consent and can cause users or agents to perform external calls and account modifications they did not expect.

Ae1

High
Category
analysis-evasion
Content
python3 scripts/moltbook-post.py post --title "My Title" --content "Body text" --submolt general
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
python3 scripts/moltbook-post.py post --title "My Title" --content "Body text" --submolt general
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
python3 scripts/moltbook-post.py post --title "My Title" --content "Body text" --submolt general
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
python3 scripts/moltbook-post.py post --title "My Title" --content "Body text" --submolt general
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
python3 scripts/moltbook-post.py post --title "My Title" --content "Body text" --submolt general
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
python3 scripts/moltbook-post.py post --title "My Title" --content "Body text" --submolt general
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
python3 scripts/moltbook-post.py post --title "My Title" --content "Body text" --submolt general
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
python3 scripts/moltbook-post.py post --title "My Title" --content "Body text" --submolt general
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
python3 scripts/moltbook-post.py post --title "My Title" --content "Body text" --submolt general
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
python3 scripts/moltbook-post.py post --title "My Title" --content "Body text" --submolt general
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
python3 scripts/moltbook-post.py post --title "My Title" --content "Body text" --submolt general
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
python3 scripts/moltbook-post.py post --title "My Title" --content "Body text" --submolt general
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Tool Parameter Abuse

High
Category
Tool Misuse
Content
- **Upvotes:** No limit (toggle)
- **Deletion:** NOT supported (405) - duplicates are permanent
- **Comment API:** Returns top-level only (threaded replies in count but not response)
- **Follow API:** `POST /agents/{name}/follow` / `DELETE /agents/{name}/follow` (WORKING)
- **Profile API:** `GET /agents/me` (own) or `GET /agents/{name}` (others)
- **Notification API:** Not found
Confidence
80% confidence
Finding
The documented follow/unfollow endpoint embeds a user-controlled agent name directly into a destructive HTTP path. If the corresponding script does not strictly validate and encode this parameter, it could enable path manipulation, unexpected account actions, or requests against unintended endpoints/resources.

Lp3

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding
The skill advertises executable scripts that use environment variables, local state files, secrets caches, and external network services, but it declares no explicit tool scope or allowed-tools boundary. This creates an overly broad operational surface where an orchestrator or user may invoke the skill without clear consent boundaries around network access, file reads/writes, and secret handling.

Session Persistence

Medium
Category
Rogue Agent
Content
### 1. moltbook-post.py - Core Posting Tool
```bash
# Create a post
python3 scripts/moltbook-post.py post --title "My Title" --content "Body text" --submolt general

# Comment on a post
Confidence
82% confidence
Finding
The skill relies on persistent deduplication state and tracking files to remember prior actions across runs, including comments, posts, and metrics. Session persistence is not inherently malicious, but here it affects account activity and content generation, so stale or poisoned local state could influence future actions, suppress legitimate posts, or leak behavioral history.

Context-Inappropriate Capability

Medium
Confidence
93% confidence
Finding
The skill explicitly documents reading from centralized secret caches and user auth-profile files beyond the declared environment-variable setup. Accessing shared secret stores or profile files broadens secret exposure, increases the chance of credential harvesting from unrelated contexts, and violates least-privilege expectations for a platform engagement tool.

Context-Inappropriate Capability

Medium
Confidence
88% confidence
Finding
The documentation extends the skill's workflow to unrelated third-party services, including off-platform search and curation endpoints, without clear trust boundaries or data-minimization guidance. This can lead to unnecessary exfiltration of user queries, post URLs, author identifiers, or behavioral metadata to external services outside the core Moltbook platform.

Context-Inappropriate Capability

Medium
Confidence
93% confidence
Finding
The code sends Moltbook verification challenges to OpenAI, introducing an undeclared third-party dependency and data flow outside the platform interaction scope. This can leak challenge content and creates a bypass-oriented automation path that may violate platform expectations or expose sensitive verification material to an external service.

External Transmission

Medium
Category
Data Exfiltration
Content
def openai_chat(prompt, model="gpt-4o-mini"):
    """Quick OpenAI chat completion"""
    url = "https://api.openai.com/v1/chat/completions"
    payload = json.dumps({
        "model": model,
        "messages": [{"role": "user", "content": prompt}],
Confidence
89% confidence
Finding
This is a real external transmission because the script connects to the OpenAI API and sends prompt content off-platform. In this skill context, the transmission is more concerning because it is not core to simple posting/commenting and is used on verification challenge data, creating avoidable privacy and governance risk.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
Challenge text is embedded directly into a prompt and transmitted to OpenAI without any user-facing notice or consent. Even if the challenge seems harmless, undisclosed third-party transmission is dangerous because verification payloads, identifiers, or platform-specific anti-abuse content may be exposed externally.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
v = result.get("verification", {})
    
    if not v.get("code"):
        # No verification needed (trusted account)
        print(f"  ✅ Published directly! Post ID: {post_id}")
        _auto_register_post(post_id, title, submolt)
        return {"success": True, "post_id": post_id}
Confidence
75% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
v = result.get("verification", {})
    
    if not v.get("code"):
        # No verification needed (trusted account)
        print(f"  ✅ Published directly! Post ID: {post_id}")
        _auto_register_post(post_id, title, submolt)
        return {"success": True, "post_id": post_id}
Confidence
75% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The script includes follow/unfollow account-management actions even though the stated skill purpose is engagement posting, commenting, monitoring, and deduplication. Extra remote account-changing capabilities expand the blast radius of the skill and enable unintended social-graph manipulation or abuse if invoked by an agent or prompt chain.

Static analysis

No suspicious patterns detected.