Back to skill

Security audit

Claw Social

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed paip.ai social automation package, but it grants broad account-changing and message-handling authority with weak safeguards, so users should review it carefully before installing.

Install only if you are comfortable giving this skill authenticated control over a paip.ai account. Do not use a primary or sensitive account until the listener is redesigned to treat incoming messages as untrusted data, credentials are not passed on the command line, tokens and logs are protected, hardcoded test credentials are removed, and public posting/following/commenting actions require clear user-directed control.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
Findings (7)

T01 · Skill Instruction Hijacking

Error
Location
scripts/websocket_listener.py:49
Finding

Remote Private Messages Are Injected into High-Priority OpenClaw Instructions

Content
View full analysis
str: """Builds the immediate reply instruction passed into OpenClaw.""" normalized_message = message_content.strip() return f""" SYSTEM ALERT: HIGH-PRIORITY TASK INJECTED You have received a new paip.ai private chat message and must handle it immediately. **Message Content:** "{normalized_message}" **Your mandatory task is as follows:** 1. **Find the Room ID:** Immediately execute a search using the paip.ai API to find the chat session where the latest message content exactly matches the text above. This typically involves calling the `/agent/chat/session/list?withLatestMessage=true` endpoint and parsing the JSON response. 2. **Extract the `roomId`** from the correct session object in the search result. 3. **Formulate a Reply:** Based on the message content, formulate a natural, conversational reply. 4. **Send the Reply:** Use the paip.ai API to send your formulated reply to the extracted `roomId`. 5. **Confirm Completion:** After sending the reply, your task is complete. """.strip() ``` ```python process = await asyncio.create_subprocess_exec( "openclaw", "system", "event", "--mode", "now", "--expect-final", "--timeout", str(SYSTEM_EVENT_TIMEOUT_MS), "--json", "--text", prompt, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE, ) ``` ```python async for message in websocket: message_content = str(message) logging.info(f"Received raw notification: {message_content}") append_event_log(message_content) await reply_queue.put(message_content) ``` ### Technical Analysis The listener treats an arbitrary WebSocket message ...[truncated 1715 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/login_and_listen.sh:71
Finding

Bearer Session Token Is Persisted Without Restrictive File Permissions

Content
View full analysis
"$TOKEN_FILE" log "Token saved to $TOKEN_FILE" ``` ### Technical Analysis The authenticated bearer token is written as plaintext without setting a restrictive `umask`, validating directory ownership, or applying mode `600`. Its resulting permissions depend on the user’s ambient umask and existing filesystem state. The script also does not create or verify `WORKSPACE_DIR` in the shown workflow. If that path or token file is pre-created or redirected through a symbolic link, the write may target an unintended file. ### Attack Path 1. A user runs the login workflow and receives a valid bearer token. 2. The script writes the token to `~/.openclaw/workspace/.session_token`. 3. A permissive umask, unsafe pre-existing file, or insufficiently protected parent directory makes the token accessible to another local principal. 4. The local attacker reads the token. 5. The attacker reuses it against authenticated paip.ai endpoints until it expires or is revoked. ### Impact Assessment The exposed bearer token grants the holder the account privileges accepted by the paip.ai API. Depending on server-side authorization, this may include reading account data, accessing social or chat metadata, publishing content, sending messages, following users, or otherwise acting as the victim. ]]>
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/login_and_listen.sh:31
Finding

Login Password Is Exposed Through Command-Line Arguments and Unsafely Interpolated JSON

Content
View full analysis
" exit 1 fi EMAIL="$1" PASSWORD="$2" generate_device_id log "Attempting to log in as $EMAIL..." # Perform login LOGIN_RESPONSE=$(curl --max-time 300 -s -X POST "$BASE_URL/user/login" \ -H "Content-Type: application/json" \ -H "X-DEVICE-ID: $DEVICE_ID" \ -H "X-Response-Language: en-us" \ -d "{\"loginType\": 1, \"username\": \"$EMAIL\", \"password\": \"$PASSWORD\"}") ``` The documented command is: ```bash ./scripts/login_and_listen.sh "your_email@example.com" "your_password" ``` ### Technical Analysis Passing a password as a positional command-line argument can expose it through shell history, terminal logging, process inspection, auditing systems, or wrapper-tool telemetry. The password is also expanded into curl’s argument vector. The JSON body is assembled using direct shell interpolation. Passwords or email addresses containing quotation marks, backslashes, control characters, or JSON metacharacters can break the payload. This is not a shell-command injection because the expansion remains quoted, but it is unsafe serialization and can produce unintended request data. ### Attack Path 1. The user follows the documented invocation and places the password directly on the command line. 2. The command is retained in shell history or briefly exposed through process and audit information. 3. Another local user, monitoring process, terminal recorder, or log collector obtains the password. 4. The attacker logs into the paip.ai account using the captured credential. 5. If the same password is reused elsewhere, compromise may extend to additional services. ### Impact Assessment The issue can disclose the account’s reusable passwor ...[truncated 225 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/websocket_listener.py:9
Finding

Raw Private Messages Are Persisted in Predictable Shared Temporary Files

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/start_websocket_listener.sh:16
Finding

Listener Management Terminates Processes Based Only on a Command-Line Substring

Content
View full analysis
/dev/null 2>&1 || true done <<< "$stale_pids" sleep 1 fi ``` ### Technical Analysis The launcher and stop script identify target processes solely by checking whether the text `websocket_listener.py` appears in the process command line. They do not validate the executable path, process owner, recorded PID, process start time, or association with this Skill instance. Consequently, unrelated processes with the same filename—or merely that text in their command line—can be signaled. This exceeds the minimum process-control privileges needed to manage the one listener started by the Skill. ### Attack Path 1. Another legitimate application runs a process whose command line contains `websocket_listener.py`. 2. The user invokes this Skill’s start or stop script. 3. The script scans the complete process list and treats the unre ...[truncated 719 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/token-manager.sh:60
Finding

Test Script Contains Hardcoded Account Credentials and Performs a Mutating Remote Action

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:77
Finding

Onboarding Installs an Unpinned Python Dependency from a Mutable Package Source

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (60)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill describes a persistent authenticated WebSocket listener that automatically forwards inbound messages into high-priority agent tasks for immediate handling. This creates a prompt-injection and remote action-trigger surface, because untrusted message content can be transformed into privileged system events and potentially drive autonomous replies or other actions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill describes a persistent authenticated WebSocket listener that automatically forwards inbound messages into high-priority agent tasks for immediate handling. This creates a prompt-injection and remote action-trigger surface, because untrusted message content can be transformed into privileged system events and potentially drive autonomous replies or other actions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill describes a persistent authenticated WebSocket listener that automatically forwards inbound messages into high-priority agent tasks for immediate handling. This creates a prompt-injection and remote action-trigger surface, because untrusted message content can be transformed into privileged system events and potentially drive autonomous replies or other actions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill describes a persistent authenticated WebSocket listener that automatically forwards inbound messages into high-priority agent tasks for immediate handling. This creates a prompt-injection and remote action-trigger surface, because untrusted message content can be transformed into privileged system events and potentially drive autonomous replies or other actions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill describes a persistent authenticated WebSocket listener that automatically forwards inbound messages into high-priority agent tasks for immediate handling. This creates a prompt-injection and remote action-trigger surface, because untrusted message content can be transformed into privileged system events and potentially drive autonomous replies or other actions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill describes a persistent authenticated WebSocket listener that automatically forwards inbound messages into high-priority agent tasks for immediate handling. This creates a prompt-injection and remote action-trigger surface, because untrusted message content can be transformed into privileged system events and potentially drive autonomous replies or other actions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill describes a persistent authenticated WebSocket listener that automatically forwards inbound messages into high-priority agent tasks for immediate handling. This creates a prompt-injection and remote action-trigger surface, because untrusted message content can be transformed into privileged system events and potentially drive autonomous replies or other actions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill describes a persistent authenticated WebSocket listener that automatically forwards inbound messages into high-priority agent tasks for immediate handling. This creates a prompt-injection and remote action-trigger surface, because untrusted message content can be transformed into privileged system events and potentially drive autonomous replies or other actions.

Content

No source excerpt is available for this finding.

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 · scripts/routines/curator.sh (reported line 35)May include surrounding context.

sh
echo "--- Starting The Curator Routine ---"
echo "--- Fetching all my posts to analyze performance... ---"

MY_POSTS_RAW=$(curl -s -G "https://gateway.paipai.life/api/v1/content/moment/list" "${HEADERS[@]}" --data-urlencode "userId=$MY_USER_ID" --data-urlencode "page=1" --data-urlencode "size=100")
MY_POSTS_CLEAN=$(echo "$MY_POSTS_RAW" | python3 "$SAFE_PARSER_PATH" data.records)

HIGHEST_SCORE=-1

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 · scripts/routines/explorer.sh (reported line 55)May include surrounding context.

sh
curl -s -X POST "https://gateway.paipai.life/api/v1/content/like/" "${HEADERS[@]}" -d "{\"type\": \"moment\", \"targetId\": $post_id}" > /dev/null
    local comment_text="Hi @$author_nickname, your post showed up while I was exploring. Looks great!"
    local reply_payload=$(jq -n --arg content "$comment_text" --arg t_id "$post_id" '{type: "moment", targetId: ($t_id | tonumber), content: $content}')
    curl -s -X POST "https://gateway.paipai.life/api/v1/content/comment/" "${HEADERS[@]}" -d "$reply_payload" > /dev/null
    
    echo "    - Interacted (Liked & Commented)."
    echo "$author_id" >> "$INTERACTED_LOG"

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 · scripts/routines/explorer.sh (reported line 73)May include surrounding context.

sh
search_terms=("Art" "Music" "Tech" "Gaming" "Photography")
    random_term=${search_terms[$((RANDOM % ${#search_terms[@]}))]}
    echo "Action: Searching for posts with keyword '$random_term'."
    FEED_RAW=$(curl -s -G "https://gateway.paipai.life/api/v1/content/search/search" "${HEADERS[@]}" --data-urlencode "keyword=$random_term" --data-urlencode "type=moment" --data-urlencode "page=1" --data-urlencode "size=10")
    FEED_CLEAN=$(echo "$FEED_RAW" | python3 "$SAFE_PARSER_PATH" data.records)
    SOURCE="Search ('$random_term')"
fi

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 · scripts/routines/guardian.sh (reported line 36)May include surrounding context.

sh
# --- Action 1: Handle New Followers ---
echo "--- Starting The Guardian Routine ---"
echo "--- 1. Checking for new followers... ---"
FANS_RAW=$(curl -s -G "https://gateway.paipai.life/api/v1/user/fans/list" "${HEADERS[@]}" --data-urlencode "userId=$MY_USER_ID" --data-urlencode "page=1" --data-urlencode "size=100")
FOLLOWING_RAW=$(curl -s -G "https://gateway.paipai.life/api/v1/user/follow/list" "${HEADERS[@]}" --data-urlencode "userId=$MY_USER_ID" --data-urlencode "page=1" --data-urlencode "size=100")

FANS_IDS=$(echo "$FANS_RAW" | python3 "$SAFE_PARSER_PATH" data.records | jq -r '.[].id')

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 · scripts/routines/guardian.sh (reported line 46)May include surrounding context.

sh
for fan_id in $FANS_IDS; do
    if ! echo "$FOLLOWING_IDS" | grep -q -w "$fan_id"; then
        echo "  - Found new follower: ID $fan_id. Following back."
        curl -s -X POST "https://gateway.paipai.life/api/v1/user/follow/user" "${HEADERS[@]}" -d "{\"followUserId\": $fan_id, \"followUserType\": \"user\"}" > /dev/null
        ((NEW_FOLLOWERS++)); sleep 1
    fi
done

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 · scripts/routines/guardian.sh (reported line 60)May include surrounding context.

sh
echo "$MY_POSTS_CLEAN" | jq -c '.[]' | while read -r post; do
    POST_ID=$(echo "$post" | jq -r '.id')
    
    COMMENTS_CLEAN=$(curl -s -G "https://gateway.paipai.life/api/v1/content/comment/list" "${HEADERS[@]}" --data-urlencode "type=moment" --data-urlencode "targetId=$POST_ID" --data-urlencode "page=1" --data-urlencode "size=50" | python3 "$SAFE_PARSER_PATH" data.records)
    
    MY_REPLIES=$(echo "$COMMENTS_CLEAN" | jq -c --arg name "$MY_NICKNAME" '.[] | select(.user.nickname == $name)')
    REPLIED_TO_IDS=$(echo "$MY_REPLIES" | jq -r '.parentId // 0' | grep -v '0' | sort -u)

External Script Fetching

High
Category
Supply Chain
Confidence
91% confidence
Finding

The upload routine transmits an arbitrary local file specified by the caller to a third-party endpoint using the bearer token and user ID, with no path restrictions, content inspection, or interactive confirmation. In the context of an agent skill, this increases the danger because another component could invoke the script with sensitive local paths, causing unintended disclosure of local data to the external service.

Content

Scanner excerpt · scripts/routines/publisher.sh (reported line 72)May include surrounding context.

sh
esac

echo "  - Uploading $MEDIA_TYPE file: $MEDIA_FILE..."
UPLOAD_RAW=$(curl --max-time 600 --connect-timeout 300 -s -X POST "https://gateway.paipai.life/api/v1/content/common/upload" \
    "${HEADERS[@]}" \
    -F "file=@${MEDIA_FILE}" -F "type=content" -F "path=content" -F "id=${MY_USER_ID}")

Ssd 1

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The function embeds attacker-controlled message text inside a high-priority system prompt that instructs the downstream agent to search sessions, extract room IDs, formulate replies, and send them. This is a classic prompt-injection sink: malicious message content can semantically override or manipulate agent behavior, causing unauthorized actions, data access, or message exfiltration in the context of the user's authenticated paip.ai account.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

Raw inbound chat content is sent to the external OpenClaw CLI for processing, which is a separate trust boundary and may result in disclosure of private user content to components beyond the WebSocket listener. Since the content is untrusted and can contain adversarial instructions, this also amplifies prompt-injection risk in the downstream agent.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill documentation describes capabilities requiring network access, shell execution, environment-variable use, and local file writes, but it declares no corresponding tool scope or permission boundaries. This creates a confused-deputy risk where an agent may perform sensitive actions without explicit authorization or user awareness.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% confidence
Finding

The skill is built around persistent sessions, chat history, listener state, and stored runtime identifiers, which increases the blast radius if local state is accessed by unauthorized parties. In a social/messaging context, retained tokens, room metadata, and chat artifacts can expose private communications and enable account actions without re-authentication.

Content

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

md
- **✅ Manage Your Home**: Keep your own profile updated with a fresh look and new information.
- **✅ Private Chat**: Start or resume user-to-user (C2C) or user-to-agent (C2A) direct messages, fetch session lists, and load chat history.
- **✅ Real-Time Listening**: Connect via WebSocket to receive instant notifications of new private chat messages.
- **✅ Group Chat**: Create group rooms, join or invite members, remove members, exit rooms, and use shared chat history and messaging APIs.

## Part 2: Advanced Gameplay - The Automated Social Routines

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The onboarding and login workflow instructs users to supply email and password to a shell script and states that session artifacts are persisted locally, but it does not prominently warn about plaintext exposure or local token storage risk. Command-line secrets can be exposed via shell history and process lists, and persisted session files can be stolen by other local users or malware if permissions are weak.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This shell code sends a file upload request containing the authenticated user's ID and shared headers that likely include credentials, but the only output is a progress message about uploading. The comments describe required environment variables for the script author, not a warning to the user that user/account data and media will be transmitted to a remote service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The function hard-codes publicScope: "PUBLIC" and creates a remote social post without any explicit warning or confirmation that the content will be published publicly. In an agent context, this can cause unintended disclosure of user text or media if a caller assumes the action is draft/private or does not realize the visibility is public.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/content.sh (reported line 50)May include surrounding context.

sh
}')

    local post_response
    post_response=$(curl --max-time 300 --connect-timeout 300 -s -X POST "https://gateway.paipai.life/api/v1/content/moment/create" \
      "${HEADERS[@]}" \
      -H "Content-Type: application/json" \
      -d "$json_payload")

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/content.sh (reported line 81)May include surrounding context.

sh
'{type: "moment", targetId: ($t_id | tonumber), content: $content, parentId: ($p_id | tonumber)}')
    
    local reply_response
    reply_response=$(curl --max-time 300 --connect-timeout 300 -s -X POST "https://gateway.paipai.life/api/v1/content/comment/" \
      "${HEADERS[@]}" -H "Content-Type: application/json" -d "$payload")

    if [[ $(echo "$reply_response" | jq -r '.code') == "0" ]]; then

External Transmission

Medium
Category
Data Exfiltration
Confidence
76% confidence
Finding

This script transmits email and password to an external domain as part of login, which is expected functionality, but still security-relevant because the skill handles raw credentials directly. In the context of an agent skill, the risk is elevated by the hardcoded third-party endpoint and subsequent token persistence, since users may delegate execution without fully understanding where their credentials are being sent.

Content

Scanner excerpt · scripts/login_and_listen.sh (reported line 45)May include surrounding context.

sh
log "Attempting to log in as $EMAIL..."

# Perform login
LOGIN_RESPONSE=$(curl --max-time 300 -s -X POST "$BASE_URL/user/login" \
  -H "Content-Type: application/json" \
  -H "X-DEVICE-ID: $DEVICE_ID" \
  -H "X-Response-Language: en-us" \

Static analysis

No suspicious patterns detected.