Back to skill

Security audit

Toutiao Mcp

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed Toutiao publishing automation skill, but users should install it carefully and understand it can post to a live account.

Install only from a trusted, pinned toutiao-mcp version or reviewed commit, avoid sudo npm install, protect the local Toutiao cookie file, and confirm content carefully before live or batch publishing because actions affect a real public account.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Error
Location
SKILL.md:72
Finding

Unpinned Third-Party Installation Can Execute Mutable Supply-Chain Code

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:72-81; references/quick-start.md:15-16; references/faq.md:9-10; references/troubleshooting.md:18-25
Vulnerability Type: Unpinned and potentially privileged third-party dependency installation
Risk Level: High

Vulnerable Code

SKILL.md:72-81:

bash
npm install -g toutiao-mcp

# Install browser
npx playwright install chromium

# Alternative: build from source
git clone https://github.com/sipingme/toutiao-mcp.git
cd toutiao-mcp
npm install
npx playwright install chromium
npm run build

references/quick-start.md:15-16 and references/faq.md:9-10:

bash
npm install -g toutiao-mcp
npx playwright install chromium

references/troubleshooting.md:18-25:

bash
# Use sudo (not recommended)
sudo npm install -g toutiao-mcp

# Or configure an npm global directory (recommended)
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
npm install -g toutiao-mcp

Technical Analysis

The installation instructions retrieve and execute mutable third-party content without pinning an exact npm package version, Playwright version, Git commit, or integrity digest. The source-build path clones the repository's current default branch and runs npm install and npm run build. These operations may execute package lifecycle scripts and other code that was not included in this audited artifact.

The npx playwright invocation is also not version-pinned. Depending on the local environment and npm behavior, npx may resolve or download a package dynamically. Consequently, the effective installation payload can change after this skill documentation has been reviewed.

The troubleshooting guide compounds the risk by suggesting sudo npm install -g toutiao-mcp. Although marked as not recommended, following this command permits package lifecycle ...[truncated 2200 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin toutiao-mcp to an explicitly reviewed version rather than installing the mutable latest release:
    bash
    npm install -g toutiao-mcp@<reviewed-exact-version>
    
  2. Pin Playwright to a reviewed exact version and avoid an unconstrained npx resolution:
    bash
    npx playwright@<reviewed-exact-version> install chromium
    
  3. For source installations, check out a reviewed immutable commit rather than relying on the repository's default branch:
    bash
    git clone https://github.com/sipingme/toutiao-mcp.git
    cd toutiao-mcp
    git checkout <reviewed-commit-hash>
    
  4. Publish and verify expected package integrity hashes or signatures. Document the trusted package owner, version, commit, and checksum together.
  5. Include and review a lockfile, then use npm ci to obtain deterministic transitive dependencies.
  6. Audit all npm lifecycle and build scripts before execution. Use --ignore-scripts where the package can function without lifecycle scripts, and explicitly document any scripts that must be enabled.
  7. Remove the sudo npm install recommendation entirely. Use an unprivileged user-owned npm prefix, a dedicated service account, or an isolated container instead.
  8. Run the MCP server with least privilege. Restrict filesystem access to dedicated cookie, data, and approved media directories, and restrict outbound network access to required Toutiao endpoints.
  9. Protect the cookie file with owner-only permissions, avoid exposing it in debug logs or issue reports, and rotate the Toutiao session if package compromise is suspected.
  10. Vendor or include the reviewed MCP implementation in the audit scope so its privacy, download validation, browser automation, and credential-handling claims can be verified.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (24)

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · references/troubleshooting.md (reported line 23)May include surrounding context.

�查指南

本指南帮助你解决使用 toutiao-mcp-skill 时遇到的常见问题。

安装问题

问题:npm install 失败

症状:

text
npm ERR! code EACCES
npm ERR! syscall access

解决方案:

bash
# 使用 sudo(不推荐)
sudo npm install -g toutiao-mcp

# 或者配置 npm 全局目录(推荐)
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
npm install -g toutiao-mcp

问题:Playwright 浏览器安装失败

症状:

text
Error: browserType.launch: Executable doesn't exist

解决方案:

bash
# 重新安装浏览器
npx playwright install chromium

# 如果还是失败,尝试手动指定浏览器路径
export PLAYWRIGHT_BROWSERS_PATH=/path/to/browsers
npx playwright install chromium

登录问题

问题:登录超时

症状:浏览器打开后长时间无响应

解决方案:

  1. 检查网络连接
  2. 关�

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% 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/troubleshooting.md (reported line 84)May include surrounding context.

  1. 检查 Cookie 文件是否存在且有效
  2. 删除 Cookie 文件重新登录:
bash
rm ~/.openclaw/data/toutiao-cookies.json

发布问题

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill is defined to activate broadly whenever a user wants to operate Toutiao, which increases the chance of unintended invocation of account-affecting automation. In this context, the skill can log in, publish content, and manage account state, so overbroad activation may cause actions on a live publishing platform when the user intended only to discuss or draft content.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Several trigger phrases are generic content-publishing requests and may overlap with ordinary conversational requests about writing or planning posts, causing accidental tool invocation. Because this skill performs real external actions against a user account, ambiguous triggers materially increase the risk of unauthorized or unintended publishing.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The batch-publishing workflow includes automatic retrieval of remote images and writes them to a local download directory, but the user-facing flow does not clearly warn about these side effects before execution. This matters because it combines external network access, local file writes, and live publishing, which can expose users to unexpected data handling and make it easier to process untrusted remote content without informed consent.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest describes this skill as operating 今日头条平台 for content publishing and account management, but the FAQ introduces a publish_xiaohongshu_data tool specifically for '小红书数据'. That suggests cross-platform publishing or ingestion behavior beyond the stated Toutiao-only scope, creating a semantic mismatch between the declared purpose and documented capability.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding

The quick-start instructs users to run npx playwright install chromium without pinning a specific Playwright version. This can lead to non-reproducible installs and supply-chain risk if the resolved package version changes unexpectedly or a compromised version is fetched at install time. In the context of an MCP skill that automates browser-based login and posting, introducing unpinned tooling increases trust on remote package resolution during setup.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The guide provides direct instructions for publishing articles and posts to a live Toutiao account without clearly warning that these actions affect an external production account and may be irreversible. Users may trigger real-world posting unintentionally, causing account misuse, reputational damage, or accidental publication of sensitive or unreviewed content. Because this skill is explicitly designed to operate a real content platform, the lack of a safety warning is more dangerous than in a purely local or simulated tool.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/troubleshooting.md (reported line 18)May include surrounding context.

解决方案:

bash
# 使用 sudo(不推荐)
sudo npm install -g toutiao-mcp

# 或者配置 npm 全局目录(推荐)
mkdir ~/.npm-global

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/troubleshooting.md (reported line 21)May include surrounding context.

md
sudo npm install -g toutiao-mcp

# 或者配置 npm 全局目录(推荐)
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/troubleshooting.md (reported line 21)May include surrounding context.

md
sudo npm install -g toutiao-mcp

# 或者配置 npm 全局目录(推荐)
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/troubleshooting.md (reported line 72)May include surrounding context.

  1. 确保目录存在:
bash
mkdir -p ~/.openclaw/data
chmod 755 ~/.openclaw/data

问题:提示"未登录"

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · references/troubleshooting.md (reported line 313)May include surrounding context.

md
ping www.toutiao.com

# 检查文件权限
ls -la ~/.openclaw/data/

# 查看进程
ps aux | grep node

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

Natural-language policy violations include forcing a specific language without user opt-in. This file presents all instructions and examples only in Chinese, with no indication that users can choose another language or that the skill is intentionally restricted to a Chinese-speaking/region-specific audience.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.