Back to skill

Security audit

MDshare Agent

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a coherent MDShare publishing helper, but it inconsistently tells agents to expose powerful manage tokens by default, which could let anyone with the link modify or delete a share.

Review before installing. Use this skill only for content you intentionally want to send to MDShare, and treat manage/edit links as sensitive credentials. Do not post or forward those links publicly; prefer returning only the public link unless you explicitly need management access, and require confirmation before deleting or consuming burn-after-read shares.

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
references/workflows.md:22
Finding

Owner Capability Token Disclosed by Default in Share-Creation Responses

Content
View full analysis

Vulnerability Details

File Location: references/workflows.md:22-35
Vulnerability Type: Capability-token exposure through insecure default output behavior
Risk Level: Medium

Vulnerable Code Snippet

text
4. Return:
   - public link
   - manage link
   - edit link only if `editorToken` exists
5. Briefly explain the difference between public and manage links.

Suggested reply shape:

```text
分享已创建。
公开访问:https://share.yekyos.com/s/{slug}
管理链接:https://share.yekyos.com/e/{slug}#manage={ownerToken}
text

### Technical Analysis

The creation workflow directs the Agent to include the manage link, containing the `ownerToken`, in its default response. This conflicts with the security requirement in `SKILL.md:15-18`, which states that token-bearing links must not be exposed unless the user explicitly wants them.

The owner token is a bearer capability rather than an informational identifier. According to the documented API, possession of it permits the holder to read and modify share content, change security settings, alter expiration and editability, and delete the share. No additional authentication is documented for these operations.

Returning this token automatically expands exposure beyond the minimum privilege required to satisfy a basic request to publish Markdown. Chat histories, Agent traces, telemetry, screenshots, copied responses, or downstream integrations may retain the token. Although placing the token in a URL fragment generally prevents it from being sent as an HTTP request path, it does not protect it from disclosure through the Agent response itself, browser history, client-side scripts, or copied links.

### Attack Path

1. A user asks the Agent to create a temporary public Markdown share but does not explicitly request administrative access.
2. The Agent calls `POST /api/shares`, receiving the public slug and `ownerToken`.
3. Following the workflow, the Agent includes the tok
...[truncated 1044 chars]
Remediation
View remediation

Remediation Suggestions

  1. Return only the public share URL by default.
  2. Require an explicit user request before displaying any manage or edit link.
  3. Update the workflow and suggested response so they agree with the restriction in SKILL.md:15-18.
  4. Avoid placing bearer tokens in ordinary Agent messages when a secure secret-delivery mechanism is available.
  5. Clearly label manage and edit links as sensitive credentials and warn users not to forward, publish, or log them.
  6. Redact ownerToken, editorToken, x-share-token, and token-bearing URLs from execution traces, telemetry, debugging output, and error messages.
  7. Where service changes are possible, support token rotation and revocation so accidentally disclosed capabilities can be invalidated without recreating the share.
  8. Add a regression test confirming that a normal “create a public share” request returns only the public URL unless privileged links were explicitly requested.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (13)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
86% confidence
Finding

The documented delete operation is a powerful state-changing action driven by user-controllable parameters such as slug and x-share-token, with no guardrails described around confirmation, provenance of the token, or validation of user intent. In an agent setting, this creates a tool-parameter abuse risk where supplied or previously observed tokens could be used to delete shares unexpectedly or through prompt-induced action chaining.

Content

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

md
### Delete a share

Owner token only. Call `DELETE /api/shares/{slug}/manage` with `x-share-token`.

## Behavior Guidance

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
93% confidence
Finding

The skill exposes a direct DELETE management endpoint guarded only by a bearer owner token, which creates a high-risk destructive capability if an agent is induced to use a supplied slug/token pair. In the mdshare-agent context, this is more dangerous because the tool is specifically designed for agents that may follow user-provided instructions, making unauthorized or accidental deletion via prompt/tool-parameter abuse a realistic risk.

Content

Scanner excerpt · references/api.md (reported line 192)May include surrounding context.

}

text

## `DELETE /api/shares/{slug}/manage`

Owner token only.

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 · references/workflows.md (reported line 108)May include surrounding context.

md
1. Require the manage link or owner token.
2. Confirm intent when the user has not already been explicit.
3. Call `DELETE /api/shares/{slug}/manage`.
4. Report success only after `{ "success": true }`.

## Workflow 6: Use MDShare as a formatting helper

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger list includes broad natural-language phrases such as 'publish notes' and 'read an MDShare link', which can cause the skill to activate in situations where the user did not clearly intend to invoke an external publishing or retrieval workflow. Because this skill can create public links and handle token-bearing URLs, unintended invocation could expose user content or cause accidental interaction with remote resources.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill advertises delete capability and documents the DELETE endpoint, but it does not require an explicit confirmation flow before destructive action. If the skill is invoked from ambiguous user phrasing or within a longer task, an agent could delete a share with only the presence of an owner token, causing irreversible loss of shared content or collaboration state.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The API reference documents creation of public shares and returns bearer-style owner/editor tokens, but it does not warn that anyone possessing those tokens can read, modify, or delete shared content. In an agent context, this omission is dangerous because agents may log, echo, store, or pass these tokens and links to unintended parties, causing unauthorized disclosure or takeover of shared content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The documentation describes burn-after-read, expiration, and deletion-related states and flows without clearly warning users that these actions may be irreversible or trigger permanent loss of content. In an autonomous agent workflow, a tool may unlock or access burn-on-view content automatically, unintentionally consuming a one-time share or causing irreversible deletion/expiration side effects.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The listed trigger requests include generic phrases like "share this markdown note" and "update this temporary share" that could overlap with ordinary user requests in broader agent contexts. The file provides positive examples but no explicit boundaries, exclusions, or negative examples clarifying when the skill should not activate.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The HTTP example shows sending raw markdown content to an external domain but does not explicitly instruct the integrator or agent to obtain user consent or warn that the content leaves the local environment. In a general-purpose agent, this can lead to unintentional exfiltration of sensitive notes, secrets, or internal documents to a third-party service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The workflow instructs the agent to return public, manage, and optionally edit links by default, but only says to briefly explain the difference between public and manage links. Manage and edit links are bearer secrets that grant modification or deletion capability, so surfacing them without a clear warning about their sensitivity increases the chance of accidental disclosure or unsafe forwarding.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% 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.

Content

Scanner excerpt · references/install-examples.md (reported line 73)May include surrounding context.

md
Guardrails:

- Do not assume a password.
- Do not auto-confirm burn-after-read unless the user clearly wants to proceed.
- If the API returns `expired`, `burned`, `deleted`, or `not_found`, report that state plainly.

## Workflow 3: Update an existing share through a token

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% 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.

Content

Scanner excerpt · references/workflows.md (reported line 56)May include surrounding context.

md
Guardrails:

- Do not assume a password.
- Do not auto-confirm burn-after-read unless the user clearly wants to proceed.
- If the API returns `expired`, `burned`, `deleted`, or `not_found`, report that state plainly.

## Workflow 3: Update an existing share through a token

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file prescribes a specific response style entirely in Chinese ("分享已创建。"), which can impose a fixed language on users regardless of their preferences or prior conversation language. There is no opt-in or instruction to match the user's language.

Content

No source excerpt is available for this finding.