Back to skill

Security audit

Weather

Security checks for vulnerabilities and agentic risk

Overview

This is a simple weather helper whose network access is disclosed and aligned with its purpose, with only minor hardening issues in example commands.

This skill is reasonable to install for weather lookups. Before using it, prefer HTTPS URLs for wttr.in and avoid saving downloads to a fixed /tmp/weather.png path; use a unique temporary filename instead if requesting weather images.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:16
Finding

Weather requests use unencrypted HTTP transport

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 16, 22, 28, and 38
Vulnerability Type: Plaintext external service communication
Risk Level: Medium

Vulnerable Code:

bash
curl -s "wttr.in/London?format=3"
bash
curl -s "wttr.in/London?format=%l:+%c+%t+%h+%w"
bash
curl -s "wttr.in/London?T"
bash
curl -s "wttr.in/Berlin.png" -o /tmp/weather.png

Technical Analysis

The wttr.in URLs omit an explicit URI scheme. Curl treats these host-style URLs as HTTP requests, so the location query and returned weather information are transmitted without TLS protection.

An attacker with a privileged network position, such as an operator of a malicious access point or a compromised network intermediary, could observe requested locations or modify responses in transit. Because the returned text may be consumed directly by an AI agent, response tampering could also provide misleading or attacker-controlled content to the current workflow.

Attack Path

  1. A user asks the agent to obtain weather information.
  2. The agent executes one of the documented curl commands.
  3. Curl connects to wttr.in over plaintext HTTP because no HTTPS scheme is specified.
  4. A network-positioned attacker intercepts the request.
  5. The attacker observes the requested location, modifies the response, or redirects the request.
  6. The agent presents or processes the untrusted response as weather-service output.

Impact Assessment

Exploitation does not directly grant local system privileges. It can expose queried location information and compromise the integrity of weather data returned to the agent. The scope is limited to requests made through the affected wttr.in commands and content derived from their responses.

Remediation
View remediation

Remediation Suggestions

  • Specify HTTPS explicitly for every wttr.in request:

    bash
    curl --fail --silent --show-error "https://wttr.in/London?format=3"
    
  • Update all remaining examples to use https://wttr.in/....

  • Use --proto '=https' to prevent fallback to unencrypted protocols:

    bash
    curl --fail --silent --show-error --proto '=https' \
      "https://wttr.in/London?format=3"
    
  • Validate or safely treat external responses as untrusted data before using them in subsequent agent operations.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:38
Finding

Predictable shared temporary-file path permits symlink-based file overwrite

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 38
Vulnerability Type: Unsafe temporary-file handling
Risk Level: Medium

Vulnerable Code:

bash
curl -s "wttr.in/Berlin.png" -o /tmp/weather.png

Technical Analysis

The command writes downloaded content to the fixed path /tmp/weather.png. On typical multi-user systems, /tmp is shared and writable by unprivileged users. An attacker can create that path in advance, including as a symbolic link to another file.

Curl opens the specified output path for writing and may follow a pre-existing symbolic link. If the process running the skill has permission to modify the symlink target, downloaded data can overwrite or corrupt that target. The predictable name also allows unrelated processes to replace, modify, or read the file between operations.

Attack Path

  1. A local attacker predicts that the skill will use /tmp/weather.png.
  2. Before the command runs, the attacker creates /tmp/weather.png as a symbolic link to a file writable by the account executing the skill.
  3. The agent executes the documented curl command.
  4. Curl follows the symbolic link while opening the output destination.
  5. Weather-service response data overwrites or corrupts the selected target file.
  6. If another operation later consumes /tmp/weather.png, the attacker may alternatively replace its contents and influence that operation.

Impact Assessment

The attacker does not obtain privileges beyond those of the account running the command. However, any file writable by that account may be exposed to corruption if it can be selected as the symlink target. On a privileged agent, the affected scope could include privileged writable files; under an unprivileged account, impact is confined to that account's writable files. Predictable-file races may also compromise the integrity of downstream image processing.

Remediation
View remediation

Remediation Suggestions

  • Create a unique temporary file securely with mktemp.
  • Apply restrictive permissions through an appropriate umask.
  • Use explicit HTTPS and curl failure handling.
  • Delete the temporary file reliably when processing finishes.

Example:

bash
umask 077
weather_file="$(mktemp "${TMPDIR:-/tmp}/weather.XXXXXX.png")" || exit 1
trap 'rm -f -- "$weather_file"' EXIT

curl --fail --silent --show-error --proto '=https' \
  "https://wttr.in/Berlin.png" \
  --output "$weather_file"

If the image must persist, store it in an application-owned directory with restrictive permissions and use an unpredictable filename rather than a shared fixed path.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 44)May include surrounding context.

Free, no key, good for programmatic use:

bash
curl -s "https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.12&current_weather=true"

Find coordinates for a city, then query. Returns JSON with temp, windspeed, weathercode.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The manifest description says only 'Get current weather and forecasts' without clarifying when this skill should or should not activate, and it does not provide a bounded set of trigger phrases or exclusion conditions. In a markdown/manifest context, this can create ambiguity for routing because many common user requests about weather could match.

Content

No source excerpt is available for this finding.