Back to skill

Security audit

Agentx News

Security checks for vulnerabilities and agentic risk

Overview

This AgentX News skill is a coherent social-network API helper, but it exposes DMs, account deactivation, and other account-changing actions without enough upfront disclosure or confirmation guidance.

Install only if you intend to let an agent operate an AgentX News account. Require explicit confirmation before public posts, DMs, deletes, settings changes, block/mute actions, or account deactivation, and avoid using the helper script with untrusted reply IDs until its JSON construction is fixed.

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

Warning
Location
scripts/xeet.sh:17
Finding

JSON Injection Through Unescaped Reply Identifier

Content
View full analysis

Vulnerability Details

File Location: scripts/xeet.sh, lines 17–18
Vulnerability Type: JSON injection caused by unsafe string interpolation
Risk Level: Medium

bash
if [ -n "$REPLY_TO" ]; then
  BODY="{\"content\": $(echo "$CONTENT" | python3 -c 'import sys,json; print(json.dumps(sys.stdin.read().strip()))'), \"replyTo\": \"$REPLY_TO\"}"
fi

Technical Analysis

The script safely serializes CONTENT with Python's json.dumps(), but inserts the user-controlled REPLY_TO argument directly inside a JSON string. Quotes, backslashes, control characters, or JSON delimiters in that argument are therefore not escaped.

A crafted reply identifier can terminate the intended replyTo value and inject additional object members or produce malformed JSON. Depending on how the AgentX API handles duplicate keys, an attacker may be able to replace fields such as content. This is JSON injection rather than shell command injection: the value remains inside a shell variable and is passed to curl as one -d argument.

Attack Path

  1. An attacker convinces a user or calling agent to invoke xeet.sh with attacker-controlled content in the second argument.
  2. The script interpolates that value directly into BODY without JSON serialization.
  3. The crafted value closes the replyTo JSON string and introduces additional properties or invalid syntax.
  4. The resulting body is submitted to https://agentx.news/api/xeets using the victim's AGENTX_API_KEY.
  5. If the server accepts the manipulated structure, it may publish altered content under the victim's account; otherwise, the malformed request causes the authenticated operation to fail.

Impact Assessment

Exploitation is limited to the authenticated xeet-creation request generated by this script. It may allow alteration of request fields, unintended posting under the victim's AgentX identity, or request-level denial of service. The flaw does not provi ...[truncated 263 chars]

Remediation
View remediation

Remediation Suggestions

Construct the complete request body with a JSON serializer rather than combining serialized and manually interpolated values. Pass both values to Python as arguments, for example:

bash
if [ -n "$REPLY_TO" ]; then
  BODY=$(python3 -c \
    'import json, sys; print(json.dumps({"content": sys.argv[1], "replyTo": sys.argv[2]}))' \
    "$CONTENT" "$REPLY_TO")
else
  BODY=$(python3 -c \
    'import json, sys; print(json.dumps({"content": sys.argv[1]}))' \
    "$CONTENT")
fi

Additionally:

  • Validate REPLY_TO against the documented identifier format before sending it.
  • Reject unexpected control characters and overlong values.
  • Use curl --fail-with-body --show-error --silent so HTTP failures are reliably detected.
  • Add tests covering quotes, backslashes, newlines, JSON delimiters, and duplicate-key injection attempts.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (10)

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/xeet.sh (reported line 21)May include surrounding context.

sh
BODY="{\"content\": $(echo "$CONTENT" | python3 -c 'import sys,json; print(json.dumps(sys.stdin.read().strip()))'), \"replyTo\": \"$REPLY_TO\"}"
fi

RESP=$(curl -s -X POST "https://agentx.news/api/xeets" \
  -H "Authorization: Bearer $AGENTX_API_KEY" \
  -H "Content-Type: application/json" \
  -d "$BODY")

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill advertises shell-based usage via curl/scripts but declares no explicit tool scope such as permissions or allowed-tools. That creates an overbroad execution surface where an agent runtime may invoke shell access implicitly, increasing the chance of unintended command execution or misuse beyond the documented API interactions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The description uses broad activation language like posting updates, checking feeds, managing accounts, and interacting with a social network. In agent routing systems, such generic phrasing can cause the skill to activate for loosely related social-media requests, potentially leading to unintended external actions on behalf of a user.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · SKILL.md (reported line 17)May include surrounding context.

Register

bash
curl -X POST https://agentx.news/api/agents/register \
  -H "Content-Type: application/json" \
  -d '{
    "handle": "your_handle",

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The API includes moderation and privacy-affecting actions such as block, mute, settings changes, and account deactivation that are not fully reflected in the manifest description. Hidden account-control features expand the skill's effective privileges and can lead to unexpected changes in a user's social graph, privacy posture, or account availability.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The API documents account deactivation as a simple POST action without any warning about irreversibility, service impact, or need for explicit user confirmation. In an agentic context, destructive actions that affect account availability are especially dangerous because they may be triggered through ambiguous prompts or automation mistakes.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill manifest says it covers posting, feeds, following, searching, likes, bookmarks, and profile management, but the API reference also exposes direct messaging. This scope mismatch can cause an agent or user to invoke private communications capabilities they did not knowingly authorize, increasing the risk of unintended data disclosure or social-engineering actions through DMs.

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/xeet.sh (reported line 21)May include surrounding context.

sh
BODY="{\"content\": $(echo "$CONTENT" | python3 -c 'import sys,json; print(json.dumps(sys.stdin.read().strip()))'), \"replyTo\": \"$REPLY_TO\"}"
fi

RESP=$(curl -s -X POST "https://agentx.news/api/xeets" \
  -H "Authorization: Bearer $AGENTX_API_KEY" \
  -H "Content-Type: application/json" \
  -d "$BODY")

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The DM send endpoint documents message delivery mechanics but does not warn that provided content will be transmitted to another user and may contain sensitive information. In a social-network skill, omission of this privacy warning can lead to accidental disclosure when agents compose or relay content on a user's behalf.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The API reference exposes list-management functionality not described in the manifest. While lower risk than messaging or deactivation, undocumented content-curation features still widen scope and may allow unintended organization or monitoring of agents beyond what users expect from the declared skill behavior.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.