Back to skill

Security audit

Encoding & Formats

Security checks for vulnerabilities and agentic risk

Overview

This is mostly a format-conversion reference, but one reusable decoder example is unsafe with crafted input and should be reviewed before use.

Review or replace the quick decode script before installing or using this skill. In particular, pass URL-decoding input to Python through argv or stdin rather than interpolating it into Python source, and avoid decoding real secrets or JWTs unless you control where the output goes.

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

Error
Location
SKILL.md:413
Finding

Arbitrary Command Execution via Python Code Injection in URL Decoder

Content
View full analysis
/dev/null) echo "URL → $URL_DECODED" fi ``` ### Technical Analysis The quick-decode script interpolates `$INPUT` directly into Python source supplied through `python3 -c`. Although the value is placed inside a single-quoted Python string, the shell does not provide protection for the resulting Python syntax. An attacker can include a single quote and closing delimiters in the input to terminate the intended string and append arbitrary Python statements. The preceding `grep` condition is not a security control. It only requires the input to contain a percent-encoded sequence and does not reject Python metacharacters. For example, an input shaped as follows passes the percent-encoding check and transforms the generated Python source into multiple executable statements: ```text ')); __import__("os").system("id"); print(unquote('%41 ``` The effective Python source becomes equivalent to: ```python from urllib.parse import unquote print(unquote('')) __import__("os").system("id") print(unquote('%41')) ``` This permits arbitrary operating-system command execution rather than merely URL decoding. ### Attack Path 1. An attacker supplies a crafted string to be decoded, such as through a message, API response, configuration value, or untrusted file. 2. A user or agent invokes the documented `decode.sh` script with that value as its argument or standard input. 3. The crafted input contains a valid percent-encoded sequence, so it passes the `grep` condition. 4. The script inserts the complete attacker-controlled value into the source passed to `python3 -c`. 5. The attacker closes the intended Pyth ...[truncated 950 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

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 89)May include surrounding context.

hello world & foo=bar

curl does it automatically for --data-urlencode

curl -G --data-urlencode "q=hello world & more" https://api.example.com/search

text

### In code

Static analysis

No suspicious patterns detected.