Back to skill

Security audit

卖家之家(跨境电商)资讯搜索与发布

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent article search and publishing integration, but its publishing flow requires fetching and re-uploading arbitrary external images without clear safety limits or confirmation.

Review this skill before installing if you will publish user-supplied or copied HTML. Use it only with content and image sources you trust, and expect it to send your MJZJ API key to MJZJ APIs and to publish articles/media under your account. The publisher should add explicit confirmation before publishing and before re-hosting external images, plus URL, network, size, redirect, and MIME validation for image downloads.

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:70
Finding

Unrestricted Remote Image Retrieval May Enable SSRF

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 70-78 and 217-218
Vulnerability Type: Server-Side Request Forgery (SSRF) through unvalidated image retrieval
Risk Level: Medium

Vulnerable Code Snippet

markdown
3. 封面处理:
  - 如果文章中有图片:下载图片文件,调用 `/api/common/applyUploadTempFile` 获取 `putUrl` 和 `path`,再使用 `putUrl` 上传到 COS,最后将该 `path` 作为 `/api/articleManage/create.coverFilePath`。
  - 如果文章没有图片:`/api/articleManage/create.coverFilePath` 传空。
4. 处理正文图片(逐张执行):
  - 先解析正文 HTML,找出所有图片地址(包含 `img data-src`、`img src`、`srcset`);同一 `img` 若同时存在 `data-src` 与 `src`,优先使用 `data-src`(`src` 作为兜底);
  - 对每一张图片分别下载文件;
  - 对每个图片文件调用 `/api/common/editorApplyUploadFile`,获取该图片对应的 `putUrl` 和 `url`;
  - 使用该 `putUrl` 将图片文件上传到 COS;

The same unsafe behavior is reiterated at lines 217-218:

markdown
- 正文HTML如有 `<img>` 图片标签:需识别 `img data-src`、`img src`、`srcset`;同一 `img` 同时存在时优先取 `data-src`,逐张转存到 COS 后用返回 `url` 替换该标签图片地址;替换后统一写回 `img src`,并避免保留外站 `data-src/srcset`,需保留原标签的 `style`。
- 发布前建议检查图片“发现数量”和“替换数量”是否一致。

Technical Analysis

The publication workflow instructs the Agent to extract image locations from attacker-influenced HTML and download every referenced resource. It does not impose restrictions on:

  • Permitted URI schemes
  • Destination hostnames or IP addresses
  • Private, loopback, link-local, multicast, or reserved address ranges
  • Cloud instance metadata endpoints
  • DNS rebinding or destination changes after resolution
  • Redirect destinations
  • Response size, download duration, or redirect count
  • Expected image MIME types or actual file signatures
  • URLs containing embedded credentials

Consequently, an attacker able to supply article HTML could place a sensitive destination in an img, data-src, or srcset attribute. The Agent may then make the request from an environment with greater network access than the attacker possesses. The subsequent instruction to upload the retrieved file to COS could create a path for extracting the response.

The ...[truncated 1994 chars]

Remediation
View remediation

Remediation Suggestions

  1. Permit only https image URLs and reject all other schemes, including file, ftp, data, gopher, and custom schemes.
  2. Reject URLs containing embedded user information or credentials.
  3. Resolve destination hostnames before connecting and block loopback, private, link-local, multicast, documentation, carrier-grade NAT, and other reserved address ranges for both IPv4 and IPv6.
  4. Explicitly deny cloud metadata hosts and addresses, including link-local metadata endpoints.
  5. Revalidate the resolved destination for every redirect and limit the number of redirects.
  6. Where operationally practical, restrict retrieval to an allowlist of trusted image hosts or require explicit user confirmation before contacting an untrusted host.
  7. Protect against DNS rebinding by connecting only to the validated resolved address while preserving the expected TLS hostname verification.
  8. Set strict connection and read timeouts, maximum response sizes, and concurrency limits.
  9. Accept only supported image MIME types and verify file signatures rather than trusting Content-Type or file extensions.
  10. Do not upload a response unless retrieval, type validation, and size validation all succeed.
  11. Avoid exposing uploaded resources until publication is explicitly confirmed by the user.
  12. Log rejected destinations and retrieval failures without recording credentials, signed upload URLs, API keys, or sensitive response content.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (9)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs the agent to download third-party images from arbitrary external URLs and re-upload them to the service, but it does not require obtaining explicit user confirmation or warning about redistribution of third-party content. This can expose private or copyrighted material to the platform, and may also cause the agent to fetch attacker-controlled URLs, creating privacy and policy risks beyond normal article publishing.

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 113)May include surrounding context.

1) 查询资讯(公开)

bash
curl -X GET "https://data.mjzj.com/api/article/search?keywords=亚马逊&size=20&position=" \
  -H "Content-Type: application/json"

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 113)May include surrounding context.

1) 查询资讯(公开)

bash
curl -X GET "https://data.mjzj.com/api/article/search?keywords=亚马逊&size=20&position=" \
  -H "Content-Type: application/json"

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 122)May include surrounding context.

1) 查询资讯(公开)

bash
curl -X GET "https://data.mjzj.com/api/article/search?keywords=亚马逊&size=20&position=" \
  -H "Content-Type: application/json"

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 130)May include surrounding context.

1) 查询资讯(公开)

bash
curl -X GET "https://data.mjzj.com/api/article/search?keywords=亚马逊&size=20&position=" \
  -H "Content-Type: application/json"

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 138)May include surrounding context.

1) 查询资讯(公开)

bash
curl -X GET "https://data.mjzj.com/api/article/search?keywords=亚马逊&size=20&position=" \
  -H "Content-Type: application/json"

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 161)May include surrounding context.

1) 查询资讯(公开)

bash
curl -X GET "https://data.mjzj.com/api/article/search?keywords=亚马逊&size=20&position=" \
  -H "Content-Type: application/json"

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 178)May include surrounding context.

1) 查询资讯(公开)

bash
curl -X GET "https://data.mjzj.com/api/article/search?keywords=亚马逊&size=20&position=" \
  -H "Content-Type: application/json"

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 195)May include surrounding context.

1) 查询资讯(公开)

bash
curl -X GET "https://data.mjzj.com/api/article/search?keywords=亚马逊&size=20&position=" \
  -H "Content-Type: application/json"

Static analysis

No suspicious patterns detected.