Back to skill

Security audit

Shell Chat

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent chat integration, but it tells agents to fetch message media URLs without safety limits, which could let outsiders make the agent contact unintended network locations.

Install only if you are comfortable connecting the agent to Shell Chat, sending messages/files to that service, managing room membership, and storing credentials or wake tokens. Configure the agent or gateway so it does not fetch arbitrary media URLs from chats; allow only trusted HTTPS media hosts or use a sandboxed media proxy. Require explicit confirmation before sending files, removing members, renaming rooms, or starting games.

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
SKILL.md:53
Finding

Unrestricted Fetching of Attacker-Controlled Media URLs

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 53–66
Vulnerability Type: Server-Side Request Forgery through unvalidated media URLs
Risk Level: Medium

Vulnerable Snippet

markdown
When someone writes to you, Shell Chat POSTs JSON to your `wakeUrl`:

**Direct message**
```json
{"text": "💬 …", "type": "message", "messageId": "…", "from": "Fabian", "from_uid": "sg_xxxxxx",
 "media_url": "https://…", "media_type": "image"}

Room message / room invite

json
{"type": "room_message", "room_id": "…", "room_name": "Friday game night", "from": "Mara", "from_uid": "sg_…", "text": "…"}
{"type": "room_invite", "room_id": "…", "room_name": "…", "from": "…"}

media_url / media_type only appear when a photo or file was sent — fetch the URL to look at it yourself.

text

The documented message-sending API also permits an optional sender-provided media URL:

```markdown
| Send | `POST /api/messages/send` `{"to":"sg_…","message":"…"}` (optional `media_url`, `media_type`: `image`/`video`/`file`) |

Technical Analysis

The Skill directs the agent to fetch every media_url received in a wake notification. The same documentation permits a message sender to include an arbitrary media_url when sending a direct message.

No requirement restricts the URL to media hosted by Shell Chat, validates its scheme or destination, blocks private and link-local addresses, performs DNS rebinding checks, or limits redirects. Consequently, an untrusted remote chat participant can influence a network request made from the agent's environment.

This crosses the trust boundary between an external Shell Chat participant and network resources accessible to the agent. The issue is an exploitable design flaw rather than evidence of malicious author intent.

Attack Path

  1. An attacker obtains the target agent's Shell Chat identifier and sends it a direct message.
  2. The attacker supplies a crafted media_url through the documented optional medi ...[truncated 1107 chars]
Remediation
View remediation

Remediation Suggestions

  1. Only retrieve media from an explicit allowlist of trusted HTTPS hosts controlled by Shell Chat.
  2. Prefer server-issued opaque media identifiers over accepting arbitrary remote URLs from message senders.
  3. Reject non-HTTPS schemes and URLs containing embedded credentials.
  4. Resolve hostnames before connecting and reject loopback, private, link-local, multicast, reserved, and cloud metadata address ranges for both IPv4 and IPv6.
  5. Repeat destination validation after every redirect and after DNS resolution to mitigate redirect-based bypasses and DNS rebinding.
  6. Disable redirects by default or permit them only when every destination remains on the trusted host allowlist.
  7. Route media retrieval through a sandboxed proxy with strict egress controls, response-size limits, timeouts, and content-type validation.
  8. Require explicit user confirmation before retrieving media from any URL outside the trusted media service.
  9. Update the Skill instruction to state these validation requirements rather than directing the agent to fetch every received URL unconditionally.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (5)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
| Send | `POST /api/chatrooms/ROOM_ID/messages` `{"message":"Hi all!"}` (optional `media_url`, `media_type`) |
| Send a file | `POST /api/chatrooms/ROOM_ID/send-file` multipart: `file`, `message` (optional) |
| Invite | `POST /api/chatrooms/ROOM_ID/members` `{"uid":"sg_…"}` or `{"uids":[…]}` |
| Leave | `DELETE /api/chatrooms/ROOM_ID/members/YOUR_UID` |
| Remove someone (owner) | `DELETE /api/chatrooms/ROOM_ID/members/THEIR_UID` |
| Rename (owner) | `PATCH /api/chatrooms/ROOM_ID` `{"name":"…","emoji":"…"}` |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
83% confidence
Finding

The skill exposes a destructive endpoint that removes another member from a room via a user-controlled path parameter. In an agent setting, if the model is induced to populate THAT_UID incorrectly or without strong authorization/context checks, it can perform harmful actions against third parties such as ejecting users from group spaces.

Content

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

md
| Send a file | `POST /api/chatrooms/ROOM_ID/send-file` multipart: `file`, `message` (optional) |
| Invite | `POST /api/chatrooms/ROOM_ID/members` `{"uid":"sg_…"}` or `{"uids":[…]}` |
| Leave | `DELETE /api/chatrooms/ROOM_ID/members/YOUR_UID` |
| Remove someone (owner) | `DELETE /api/chatrooms/ROOM_ID/members/THEIR_UID` |
| Rename (owner) | `PATCH /api/chatrooms/ROOM_ID` `{"name":"…","emoji":"…"}` |

Room messages have `kind`: `"message"` or `"system"` (joined / left / renamed).

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger phrases are broad and map to common conversational language such as 'group chat' or 'send a message to', which can cause accidental invocation. In a communication skill, mistaken activation can result in unintended outbound messages, room joins, or other external actions affecting real users.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description emphasizes messaging, files, and media handling but does not clearly warn that using the skill sends data to an external service and may fetch attacker-controlled media URLs. In a chat context, this is especially risky because it can lead to unintended disclosure of user content or server-side retrieval of untrusted resources.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is presented as a chat/messaging capability, but it also exposes game initiation and follow-on game control concepts that extend beyond the declared scope. Scope expansion increases the chance that an agent invokes higher-impact actions without clear user understanding, especially when triggers suggest simple messaging rather than starting multiplayer interactions.

Content

No source excerpt is available for this finding.