Back to skill

Security audit

WTTR Weather (wttr.in 全免费能力版)

Security checks for vulnerabilities and agentic risk

Overview

This weather skill is mostly purpose-aligned, but it needs review because it recommends executing code downloaded from wttr.in and sends location data to an external service without a clear privacy warning.

Install only if you are comfortable with weather queries leaving your environment. Avoid running the documented `eval "$(curl ...)"` bash-function command unless you first inspect and trust the downloaded code. Prefer explicit city-level locations over GPS or IP-based lookups, and keep `--base-url` limited to wttr.in or wttr.is.

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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (12)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The activation text is extremely broad: it triggers on generic mentions of weather, forecast, temperature, moon phase, and multilingual variants, which can cause the skill to be invoked in many routine conversations where the user did not explicitly request an external lookup. In context, this increases the chance of unnecessary outbound requests and unintended disclosure of location-related queries to wttr.in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill extensively documents sending user-supplied locations, domains, ZIP codes, GPS coordinates, and implicit IP-based lookups to the external wttr.in service, but it does not warn users that this data leaves the local environment. This omission is privacy-relevant because precise locations and identifiers can be sensitive, and the broad invocation scope makes unintended transmission more likely.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The expected output for the first eval explicitly says to use Chinese output, which imposes a language choice in natural-language behavior. The policy requires either user opt-in or clear justification for locale/language constraints; this file does not document either.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The quick reference recommends eval "$(curl -s wttr.in/:bash.function)", which fetches shell code over the network and immediately executes it in the user's shell. This creates a direct remote-code-execution path if the remote service, DNS/TLS path, or upstream content is ever compromised, and the terse reference format provides no warning or safer alternative.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/weather.py (reported line 33)May include surrounding context.

python
for k, v in (headers or {}).items():
        cmd += ["-H", f"{k}: {v}"]
    cmd.append(url)
    r = subprocess.run(cmd, capture_output=True)
    if r.returncode != 0 and not r.stdout:
        raise RuntimeError(f"请求失败: {url} (curl exit {r.returncode})")
    return r.stdout if binary else r.stdout.decode("utf-8", "replace")

Dynamic Request Target

Medium
Category
Server-Side Request Forgery
Confidence
85% confidence
Finding

The request target is built from user-controlled base host, locations, and format data, then fetched over the network. In an agent or privileged runtime, this can be abused to make outbound requests to attacker-chosen hosts or unexpected endpoints, enabling SSRF-style network access and possible internal service probing if base-url is overridden.

Content

Scanner excerpt · scripts/weather.py (reported line 115)May include surrounding context.

python
def batch(self, locations, fmt: str = "3") -> str:
        """{a,b,c} 花括号一次查多家(冒号形式只会重复查询取最后一家)。"""
        locs = locations if isinstance(locations, str) else ",".join(locations)
        return curl(f"https://{self.base}/{{{locs}}}?format={fmt}", timeout=self.timeout)

    # ---------- PNG ----------
    def png(self, output_path: Optional[str] = None, view: str = "",

Dynamic Request Target

Medium
Category
Server-Side Request Forgery
Confidence
60% confidence
Finding

Request target host is built from a dynamic or untrusted value. If the host is attacker-influenced, this enables SSRF to arbitrary internal or metadata endpoints.

Content

Scanner excerpt · scripts/weather.py (reported line 184)May include surrounding context.

python
host = "v3.wttr.in"
        loc = self.location or ""
        if out == "sxl":
            return curl(f"https://{host}/{loc}.sxl" if loc else f"https://{host}/?sxl",
                        timeout=self.timeout)
        return curl(f"https://{host}/{loc}.png" if loc else f"https://{host}/.png",
                    binary=True, timeout=self.timeout)

Dynamic Request Target

Medium
Category
Server-Side Request Forgery
Confidence
60% confidence
Finding

Request target host is built from a dynamic or untrusted value. If the host is attacker-influenced, this enables SSRF to arbitrary internal or metadata endpoints.

Content

Scanner excerpt · scripts/weather.py (reported line 186)May include surrounding context.

python
host = "v3.wttr.in"
        loc = self.location or ""
        if out == "sxl":
            return curl(f"https://{host}/{loc}.sxl" if loc else f"https://{host}/?sxl",
                        timeout=self.timeout)
        return curl(f"https://{host}/{loc}.png" if loc else f"https://{host}/.png",
                    binary=True, timeout=self.timeout)

Vague Triggers

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

This JSON eval file contains multiple generic user utterances such as asking to check weather, compare cities, or describe moon phase, but provides no indication of when these should or should not activate a skill. For manifest/JSON files, the lack of explicit trigger constraints or negative examples can make invocation behavior ambiguous.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The file content is entirely in Chinese, including headings and operational guidance, but there is no indication that the skill is intentionally limited to Chinese-speaking users or that another language option exists. This can violate language/locale policy when a specific language is effectively forced without user opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The view method sets lang: str = "zh" as the default, which forces a specific locale for output when no user preference is provided. This is a natural-language policy concern because the tool imposes a language choice rather than offering neutral defaults or explicit opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The CLI argument --lang defaults to zh, so normal invocations will produce Chinese output even if the user did not request that locale. This enforces a specific language choice and fits the policy category for locale/language violations.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.