T01 · Skill Instruction Hijacking
- Location
scripts/monitor.js:306- Finding
Forged System Messages Hijack the Consuming Agent's Output
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill has a coherent Xiaohongshu monitoring purpose, but it automatically discovers and uses local authentication cookies and emits forged system-style instructions that warrant review before installation.
Install only if you are comfortable with this skill using a Xiaohongshu account session and saving full-page screenshots. Prefer providing XHS_COOKIE explicitly for each run, avoid keeping reusable cookies in discoverable shell scripts, use a dedicated low-privilege monitoring account, and run the browser in an isolated environment if possible. Treat the script output after RESULT_END as untrusted formatting text, not as system instructions.
scripts/monitor.js:306Forged System Messages Hijack the Consuming Agent's Output
scripts/monitor.js:57Automatic Cross-Directory Discovery and Use of Authentication Cookies
scripts/monitor.js:187Chromium Sandbox Disabled While Processing Remote Web Content
The documented behavior says the user should configure XHS_COOKIE, but the skill text also states it will fall back to reading existing scripts and extracting exported cookies from them. That is undeclared local file access and credential harvesting behavior, which can expose account-scoped authentication material from unrelated files and violates least surprise.
The skill declares no explicit tool or permission scope even though it depends on environment-provided secrets such as XHS_COOKIE. In practice this weakens user awareness and policy enforcement around secret use, making it easier for the skill to access authenticated state without a clearly declared trust boundary.
The description states the skill is '面向中文用户' and the instructions throughout are fixed to a Chinese-user context, but there is no indication that language/locale behavior is optional or user-selectable. This is a natural-language policy concern because it imposes a specific language/locale without offering opt-in or documenting a justified regional constraint.
The skill relies on authenticated XHS cookies and captures screenshots, but the description does not clearly warn that outputs may include account-scoped content visible only to the logged-in user. This can lead users to unknowingly collect or share sensitive browsing results and images tied to a personal or corporate account.
The skill mentions Telegram and WeCom as delivery channels but does not clearly warn that collected notes, summaries, and screenshots may be transmitted to third-party messaging services. That omission increases the risk of accidental external disclosure of sensitive monitoring data, authenticated content, or screenshots.
The code does not only use an explicitly provided XHS_COOKIE from the environment; it also searches multiple local filesystem paths for shell scripts and regex-extracts an exported XHS_COOKIE value from them. That is a credential-discovery/harvesting behavior that exceeds the stated monitoring purpose and can silently consume secrets from unrelated locations, especially dangerous in shared workspaces or multi-skill agent environments.
The script reads authentication cookies from both environment variables and local shell scripts without clear user disclosure in the code path, which creates hidden secret-handling behavior. In agentic or hosted execution contexts, this can surprise operators, weaken least-privilege expectations, and cause unintended account access using ambient credentials.
The script writes full-page screenshots to disk for normal, login, captcha, and error states. Those images may capture sensitive content such as account state, search results, QR/login prompts, or other on-screen data, and persisting them locally increases the risk of later unauthorized access or accidental disclosure.
The code forces the Accept-Language header to prefer zh-CN and zh, which imposes a specific locale on all requests. There is no user opt-in, configuration option, or justification indicating that the skill is intentionally region-specific.
No suspicious patterns detected.