T05 · Unauthorized Access and Privilege Escalation
- Location
references/wsl-cdp-browser.md:37- Finding
Unauthenticated CDP Browser Control Exposed on All Network Interfaces
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill has a coherent WeChat article-search purpose, but its setup exposes a powerful browser-control port, leaves persistent network rules, includes a plaintext API key, and handles login artifacts in predictable temp files.
Review carefully before installing. Only use this in an isolated browser profile, do not expose CDP to your LAN, remove any Windows portproxy/firewall rules after use, treat the documented API key as compromised, and avoid scanning QR login codes or running cleanup against a browser profile that has unrelated tabs or accounts.
references/wsl-cdp-browser.md:37Unauthenticated CDP Browser Control Exposed on All Network Interfaces
references/wsl-cdp-browser.md:37Persistent Port Proxy and Firewall Exception Lack Teardown
references/api-limitations.md:21Plaintext WeChat Read API Key Committed to Documentation
references/detailed-workflow.md:110Predictable Shared Temporary Files Store Login and Search Data
references/detailed-workflow.md:380Cleanup Routine Closes Browser Tabs Not Created by the Skill
The documentation exposes what appears to be a live WeRead Agent API key in plaintext. Even though it is presented as a test artifact, publishing valid credentials enables unauthorized use of the associated account or quota and may expose internal capabilities beyond the skill's stated purpose.
A hard-coded API key embedded in documentation is still a credential disclosure, regardless of whether it is executable code. Attackers routinely scrape repositories and docs for secrets, and the surrounding text explicitly labels it as an API key and test timestamp, increasing the likelihood it is real and usable.
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).
登录成功后清理临时文件:
rm -f /tmp/weread_qr.png /tmp/qr_url.txt
The guide instructs users to expose the Chrome/Edge DevTools Protocol by binding a Windows port proxy to 0.0.0.0 and adding a firewall allow rule, which can make the browser debugging interface reachable beyond the intended WSL boundary. CDP commonly permits powerful browser control, page inspection, cookie/session access, and arbitrary navigation, so unintended network exposure can enable full browser compromise from other hosts on the network.
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
WINDOWS_IP=$(ip route | grep default | awk '{print $3}')
curl -s "http://${WINDOWS_IP}:9223/json/version" | python3 -c "import sys,json; print(json.load(sys.stdin).get('Browser','FAIL'))"
# 输出浏览器名称即成功
The README describes activation in very broad natural-language terms such as telling the agent to 'search whatever you want,' without defining narrow trigger conditions, confirmation requirements, or scope limits. This can cause unintended invocation during ordinary conversation and may lead the agent to launch browser automation, initiate QR-code login flows, and persist search results to local files when the user did not explicitly intend to use this skill.
The skill clearly instructs the agent to use browser automation, shell commands, local temporary files, and networked access, but it does not declare any explicit tool scope such as permissions or allowed-tools. That mismatch weakens policy enforcement and reviewability: an agent runtime may grant broader capabilities than intended, making risky actions like shell execution, file writes under /tmp, and authenticated web access easier to abuse or harder to constrain.
The workflow explicitly extracts a WeRead login QR code, writes its source to /tmp/qr_url.txt, decodes or downloads the image to /tmp/weread_qr.png, and instructs the agent to immediately send that authentication artifact to the user. A login QR code is sensitive authentication material; storing it in predictable world-accessible temp paths without an explicit warning, access controls, or guaranteed secure deletion increases the risk of unintended disclosure or reuse by other local processes or logs.
The function uses the Chrome DevTools Protocol /json endpoint to enumerate tabs and then forcibly closes any page whose URL matches mp.weixin.qq.com. That capability exceeds the stated purpose of searching and extracting article metadata/links, and it can interfere with unrelated user/browser state or destroy in-progress work if the same browser session is shared.
This markdown skill reference forces a specific language/locale for all instructions and examples, which can violate language-choice policy when no user opt-in or region-specific justification is provided. Because the file contains only Chinese-language guidance and no alternative language option, users who do not read Chinese may be excluded.
Suspicious Unicode normalization or mixed-script content
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def get_search_page_ws():
"""获取搜索页面的 WebSocket URL"""
result = subprocess.run(
['curl', '-s', f'http://{WINDOWS_IP}:{CDP_PORT}/json'],
capture_output=True, text=True
)
This markdown file contains executable template code that writes extracted article metadata and URLs to /tmp/urls.json, and elsewhere also redirects scraped data into /tmp/arts.json and /tmp/urls_raw.json. The document explains how to do this, but it does not include any warning about storing scraped content locally or the privacy implications of extracting and retaining article data.
This code file contains user-facing natural-language strings only in Chinese in the module docstring and usage text. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale limitation is explicitly justified.
No suspicious patterns detected.