T09 · Insecure Skill Coding Practices
- Location
browser_tool_py36.py:180- Finding
Unrestricted URL Handling Enables Local File Access and Server-Side Request Forgery
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This browser automation skill has useful scraping features, but it can persist and upload scraped page data with weak scoping and insufficient user control.
Install only if you are comfortable with a browser automation skill that can scrape arbitrary pages, save page contents to disk, and upload scraped data to Feishu from CLI modes. Avoid using it on authenticated, internal, localhost, private-network, file://, or sensitive pages unless you have sandboxed the browser, disabled or reviewed Feishu export, and controlled the cache/output directories and npm dependency versions.
browser_tool_py36.py:180Unrestricted URL Handling Enables Local File Access and Server-Side Request Forgery
browser_tool_py36.py:210Persistent Snapshot Cache Can Disclose Data Across URLs and Browser Sessions
SKILL.md:32Unpinned Global npm and npx Dependencies Create a Supply-Chain Execution Risk
The documented purpose emphasizes headless browser automation, ARIA refs, and natural-language control, but the described/observed behavior expands into scraping, local persistence, optional third-party document export, and batch/scheduled collection. This mismatch is dangerous because users and policy engines may approve the skill for limited UI automation while it also performs broader data collection and exfiltration-adjacent actions not clearly disclosed.
The file presents all user-facing instructions in Traditional Chinese, and there is no indication that other languages are supported or that the locale restriction is intentional and justified. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.
The README instructs users to run npx clawhub without pinning an exact package version. Because npx resolves and executes whatever version is current at execution time, a compromised, typosquatted, or unexpectedly updated package could run arbitrary code on the user's system during publish operations.
The verification command also uses npx clawhub without version pinning, creating the same supply-chain risk as the publish example. Users following the README may execute an unreviewed remote package version, which is especially risky because this skill is aimed at automation tooling and likely to be used in developer environments with broad local access.
The skill advertises executable dependencies and browser automation behavior but does not declare any explicit tool scope or permissions boundaries. In an agent environment, this can lead to overbroad access to shell, filesystem, and environment capabilities, making unintended command execution, local file access, or data handling harder to constrain and review.
The skill documentation promotes live browser interaction and web scraping but does not warn users that actions may submit data to external sites, trigger state-changing clicks or form fills, or collect and store third-party content. In an agentic setting, lack of user-facing warning increases the risk of accidental data disclosure, unauthorized interaction with live services, and compliance issues around scraping.
The tool silently caches browser results to ~/.openclaw/cache/browser, potentially persisting page content, command results, and data from authenticated sessions to disk without disclosure or access controls. On multi-user systems or compromised endpoints, this can leak sensitive browsing data long after the browser session ends.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
full_cmd = base_cmd + cmd
try:
result = subprocess.run(
full_cmd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.
else:
return {"success": False, "error": "Traditional engine not implemented yet"}
def wait(self, selector=None, timeout=None, text=None, load_state=None):
"""等待"""
self._log("wait: selector=%s, timeout=%s, text=%s, load_state=%s" % (
selector, timeout, text, load_state))
The skill exposes in-page JavaScript execution via the agent-browser eval command in helper methods. Even though the bundled snippets are static, the presence of eval-capable browser automation materially increases capability: if this wrapper is extended or combined with untrusted prompts, it can execute arbitrary script in the context of visited pages, enabling data extraction, DOM manipulation, and actions under the user's authenticated session.
The manifest frames the skill as a general browser automation CLI with ARIA-based targeting and natural-language operation, while this module is purpose-built for scraping pages, extracting content/images/links, and persisting results. Those persistence and document-publication behaviors are not communicated by the manifest description and go beyond generic browser automation.
The code transmits scraped page content to Feishu, an external service, even though that remote publication behavior is not reflected in the declared skill purpose. Hidden or under-disclosed outbound data transfer is dangerous because users may scrape internal, authenticated, or sensitive pages and unknowingly exfiltrate their contents to a third-party platform.
This section formats and exports full scraped content, including page text and possibly links/images, into Feishu documents. In the context of a browser automation skill, that creates a meaningful semantic data leakage risk because arbitrary visited pages may contain confidential user-visible information that is then copied to an external platform.
The scraper automatically persists extracted content, links, and images to local JSON and Markdown files without any retention controls, encryption, or sensitivity checks. For arbitrary webpages, especially authenticated or internal pages, this can leave readable copies of sensitive material on disk where other users, processes, or backups may access them.
The CLI paths invoke scrape/batch_scrape with save_to_feishu=True by default, causing automatic external transmission of scraped content without an explicit user warning or consent gate. This is especially risky for a browser-based scraper because operators may target pages containing private documents, authenticated content, or regulated data, resulting in unintentional data exfiltration.
The screenshot method accepts an arbitrary path and forwards it directly to the external browser tool, enabling writes to attacker-chosen filesystem locations if an untrusted caller controls the argument. In an agent setting, this can overwrite files accessible to the current user or place sensitive screenshots in unsafe locations.
The natural-language interface only recognizes hard-coded Chinese and English trigger verbs such as 打開/open, 點擊/click, and 填寫/fill. This constrains language behavior without any explicit user opt-in or documentation that the interface is limited to those locales.
The module docstrings, comments, help text, and user-facing output are all presented in Chinese, with no indication that the skill supports other languages or that Chinese is a deliberate locale-specific requirement. This can violate language/locale policy when users are not given an explicit language choice or opt-in.
The manifest describes a CLI for headless browser automation, ARIA targeting, and natural-language operation, but this module also introduces cron-style scheduled execution driven by environment configuration. Using environment variables as an execution input channel is a separate operational capability not implied by the stated purpose.
No suspicious patterns detected.