Back to skill

Security audit

linkdigest-xhs-note-ocr

Security checks for vulnerabilities and agentic risk

Overview

The skill coherently extracts user-supplied content through LinkDigest, with disclosed costs and data sharing and an optional unpinned MCP bridge.

Submit public content and remove unrelated personal text from sharing messages. Results may be shared by link and processed by third-party models, as described in the [provider privacy policy](https://linkdigest.dev/privacy). Set --max-credits to limit spending and keep the API key private. Prefer the bundled client or direct HTTP; review and pin the optional MCP bridge before using it.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (8)

Tainted flow: 'req' from os.environ.get (line 102, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/linkdigest.py (reported line 110)May include surrounding context.

python
if data is not None:
        req.add_header("Content-Type", "application/json")
    try:
        with urllib.request.urlopen(req, timeout=timeout, context=_SSL["context"]) as resp:
            status, headers, raw = resp.status, resp.headers, resp.read()
    except urllib.error.HTTPError as err:
        status, headers, raw = err.code, err.headers, err.read()

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The core API workflow matches the declared Xiaohongshu extraction purpose, but the executable exposes materially broader content-processing capabilities that are not disclosed in the description. These are explicit CLI options and API request fields, not merely supporting implementation details. The code sends user-provided content and, when configured, the API key to the declared LinkDigest service; no unrelated data collection or local file modification is evident. Extraction accuracy, service-side behavior, and pricing cannot be verified from this client alone.

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 · SKILL.md (reported line 22)May include surrounding context.

md
实测同一条图文笔记(公开结果页:https://linkdigest.dev/d/5d0e7837ec2742ea4ae07806d979f0ce ):

- 直接 curl 网页,去掉脚本和样式后只剩 860 个可见字符;
- yt-dlp 报 `No video formats found`(它只认视频笔记);
- LinkDigest 返回的 Markdown 是 35,059 个字符,约为前者的 41 倍。

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 · SKILL.md (reported line 22)May include surrounding context.

md
实测同一条图文笔记(公开结果页:https://linkdigest.dev/d/5d0e7837ec2742ea4ae07806d979f0ce ):

- 直接 curl 网页,去掉脚本和样式后只剩 860 个可见字符;
- yt-dlp 报 `No video formats found`(它只认视频笔记);
- LinkDigest 返回的 Markdown 是 35,059 个字符,约为前者的 41 倍。

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

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

提交:

bash
curl -sS -X POST https://linkdigest.dev/api/v1/digest \
  -H "Authorization: Bearer $LINKDIGEST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.xiaohongshu.com/explore/<笔记ID>?xsec_token=<...>", "format": "json"}'

MCP server referenced without pinned version: 'npx mcp-remote'.

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The optional npx mcp-remote command can download and execute an unpinned npm package with the local user's privileges. A compromised or malicious package release could access local files and credentials, including the API key supplied to the command; this risk arises if the user follows this optional integration path.

Content

No source excerpt is available for this finding.

The Xiaohongshu image-note OCR skill exposes multi-platform video processing and additional paid analysis/translation operations not declared in its manifest.

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

The manifest limits the skill to extracting Xiaohongshu image-note content through LinkDigest. In contrast, L264–L272 explicitly expose other platforms, long-video transcription, viral-content analysis, and translation; L289–L305 forward the corresponding processing options to the API. These are additional user-facing processing capabilities, including options documented as costing extra credits, rather than implementation details necessary for Xiaohongshu OCR.

Content

No source excerpt is available for this finding.