Back to skill

Security audit

hm-research

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed H&M catalog lookup tool, but its helper can send authenticated POST requests beyond the documented read-only API shape.

Install only if you are comfortable giving this skill a Crawlora API key and having your H&M lookup queries sent to Crawlora. Treat it as a Review item until the helper is tightened to GET-only documented routes and numeric product IDs, which would better match the read-only catalog purpose.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/crawlora.sh:45
Finding
Overbroad HTTP Method and Product Route Authorization<![CDATA[ ## Vulnerability Details **File Location**: `scripts/crawlora.sh`, lines 45–65 and 95–100 **Vulnerability Type**: Overbroad API request authorization **Risk Level**: Medium ### Vulnerable Code ```bash case "$method" in GET|POST) ;; *) echo "only GET and POST are supported by the hm-research skill" >&2 exit 2 ;; esac # Reject path syntax that could smuggle a route through a shell glob check. case "$path" in ""|*[?#%]*|*..*|*//* ) echo "invalid path for the hm-research skill" >&2 exit 2 ;; esac case "$path" in /hm/categories) ;; /hm/listing) ;; /hm/product/*) ;; /hm/product/*/related) ;; /hm/search) ;; /hm/search/suggestions) ;; /hm/stores) ;; *) echo "path is not in the hm-research skill catalog" >&2 exit 2 ;; esac ``` ```bash else [ -n "$body" ] || body="${rest[0]:-}" [ -n "$body" ] || body='{}' # Stream the body on stdin so curl never interprets a user value as its # @file shorthand (and cannot read local files supplied in a request body). printf '%s' "$body" | curl -fsS -X "$method" "${auth[@]}" \ -H "Content-Type: application/json" --data-binary @- "${base}${path}" fi ``` ### Technical Analysis The endpoint reference declares seven read-only H&amp;M operations, all using HTTP `GET`. The helper nevertheless accepts both `GET` and `POST` for every allowlisted path. It then forwards an arbitrary JSON body with the user's `CRAWLORA_API_KEY` when `POST` is selected. The product route validation is also broader than the documented API: ```bash /hm/product/*) ;; /hm/product/*/related) ;; ``` The first pattern accepts any nonempty suffix, including nonnumeric product identifiers and additional path segments. It already subsumes the second pattern because shell `*` can match slashes. This does not enforce the documented forms: - `/hm/product/{numeric_product_id}` - `/hm/product/{numeric_product_id}/related` Consequently, the helper can authenticate undocumented POST request ...[truncated 2009 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Reject every method except `GET`, because all documented endpoints are read-only: ```bash [ "$method" = "GET" ] || { echo "only GET is supported by the hm-research skill" >&2 exit 2 } ``` 2. Replace broad shell-glob authorization with endpoint-specific validation. Require product IDs to contain digits only and distinguish the detail and related routes explicitly: ```bash case "$path" in /hm/categories|/hm/listing|/hm/search|/hm/search/suggestions|/hm/stores) ;; /hm/product/[0-9]*) product_suffix="${path#/hm/product/}" case "$product_suffix" in *[!0-9]*|"") echo "invalid product path" >&2; exit 2 ;; esac ;; /hm/product/[0-9]*/related) product_id="${path#/hm/product/}" product_id="${product_id%/related}" case "$product_id" in *[!0-9]*|"") echo "invalid related-product path" >&2; exit 2 ;; esac ;; *) echo "path is not in the hm-research skill catalog" >&2 exit 2 ;; esac ``` 3. Prefer a strict regular-expression check in Bash for the two dynamic routes: ```bash if [[ "$path" =~ ^/hm/product/[0-9]+(/related)?$ ]]; then : fi ``` 4. Bind each endpoint to its documented method rather than validating methods and paths independently. This prevents future changes from accidentally authorizing unsafe method/path combinations. 5. Add negative tests covering POST requests, nonnumeric product IDs, nested product paths, encoded separators, traversal syntax, query fragments, and undocumented routes. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Lp3

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding
The skill invokes shell-based helper commands but does not declare any explicit tool scope or allowed-tools restrictions. That creates unnecessary execution latitude: an agent/runtime may permit broader shell use than intended, increasing the chance of command misuse, unsafe command composition, or lateral access beyond simple API calls.

External Transmission

Medium
Category
Data Exfiltration
Content
#!/usr/bin/env bash
# Crawlora REST helper — minimal, dependency-free (curl only).
# Calls https://api.crawlora.net/api/v1 with your Crawlora API key.
# Get a free key (2,000 credits/mo, no card) at https://crawlora.net?utm_source=github&utm_medium=referral&utm_campaign=crawlora-skills.
#
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
#!/usr/bin/env bash
# Crawlora REST helper — minimal, dependency-free (curl only).
# Calls https://api.crawlora.net/api/v1 with your Crawlora API key.
# Get a free key (2,000 credits/mo, no card) at https://crawlora.net?utm_source=github&utm_medium=referral&utm_campaign=crawlora-skills.
#
# Usage:
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
#!/usr/bin/env bash
# Crawlora REST helper — minimal, dependency-free (curl only).
# Calls https://api.crawlora.net/api/v1 with your Crawlora API key.
# Get a free key (2,000 credits/mo, no card) at https://crawlora.net?utm_source=github&utm_medium=referral&utm_campaign=crawlora-skills.
#
# Usage:
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
#!/usr/bin/env bash
# Crawlora REST helper — minimal, dependency-free (curl only).
# Calls https://api.crawlora.net/api/v1 with your Crawlora API key.
# Get a free key (2,000 credits/mo, no card) at https://crawlora.net?utm_source=github&utm_medium=referral&utm_campaign=crawlora-skills.
#
# Usage:
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
#!/usr/bin/env bash
# Crawlora REST helper — minimal, dependency-free (curl only).
# Calls https://api.crawlora.net/api/v1 with your Crawlora API key.
# Get a free key (2,000 credits/mo, no card) at https://crawlora.net?utm_source=github&utm_medium=referral&utm_campaign=crawlora-skills.
#
# Usage:
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
# Keep the API key out of the curl process command line. A private temporary
# config supplies the header and is removed automatically on exit.
curl_config="$(mktemp "${TMPDIR:-/tmp}/crawlora-curl.XXXXXX")"
chmod 600 "$curl_config"
trap 'rm -f "$curl_config"' EXIT
printf 'header = "x-api-key: %s"\n' "$CRAWLORA_API_KEY" >"$curl_config"
auth=(--config "$curl_config")
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

External Transmission

Medium
Category
Data Exfiltration
Content
[ -n "$body" ] || body='{}'
  # Stream the body on stdin so curl never interprets a user value as its
  # @file shorthand (and cannot read local files supplied in a request body).
  printf '%s' "$body" | curl -fsS -X "$method" "${auth[@]}" \
    -H "Content-Type: application/json" --data-binary @- "${base}${path}"
fi
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Vague Triggers

Low
Confidence
81% confidence
Finding
The file says to call the endpoints via `scripts/crawlora.sh` but does not specify the trigger phrases, scope boundaries, or exclusion conditions for invoking this skill. In a markdown reference file, this can contribute to ambiguous activation because it describes usage without clarifying when the skill should or should not be selected.

Static analysis

No suspicious patterns detected.