Back to skill

Security audit

Meme Generator

Security checks for vulnerabilities and agentic risk

Overview

This skill has real meme-caption code, but it also includes an under-disclosed local data manager that stores user input and command history on disk.

Review this skill before installing. Its meme-caption helper is simple and local, but the package also contains a separate generic utility that can save and search user text under the meme-generator data directory. Do not enter private prompts, filenames, customer data, or proprietary text unless you are comfortable with local plaintext retention, and prefer a version that removes or clearly documents the data-manager script and logging behavior.

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

T09 · Insecure Skill Coding Practices

Note
Location
scripts/meme.sh:3
Finding

Unquoted Input Permits Pathname Expansion and Argument Alteration

Content
View full analysis
/dev/null || true; INPUT="$*" python3 -c ' ... ' "$CMD" $INPUT ``` ### Technical Analysis `$INPUT` is expanded without quotation marks when passed to Python. Bash consequently performs word splitting and pathname expansion before starting the Python process. For example, an input containing `*` may expand to filenames in the current working directory. The expanded filenames are then passed as separate Python arguments and can appear in the generated output. Whitespace and wildcard characters in legitimate captions may also change argument boundaries or otherwise corrupt the requested text. This is not direct shell-command injection: control operators produced by variable expansion are not reparsed as shell syntax. Nevertheless, the unsafe expansion can disclose filenames and produce unintended behavior. ### Attack Path 1. An attacker or untrusted caller supplies a caption or topic containing a shell wildcard, such as `*`. 2. The script combines the arguments into the `INPUT` variable. 3. The shell expands unquoted `$INPUT`, including glob patterns, against the current directory. 4. Matching local filenames are passed to Python as arguments. 5. Python joins and prints those arguments as part of the generated meme output. 6. The caller may consequently learn filenames from the directory in which the script was invoked. ### Impact Assessment Exploitation occurs with the privileges of the user running the script. It does not grant elevated privileges or direct file-content access, but it can expose local filenames, alter caption contents, and make command behavior dependent on the working directory. ]]>
Remediation
View remediation
/dev/null || true python3 -c ' import sys cmd = sys.argv[1] if len(sys.argv) > 1 else "help" inp = " ".join(sys.argv[2:]) # Remaining implementation ' "$CMD" "$@" ``` Quoting `"$@"` preserves argument boundaries and prevents pathname expansion. If a single reconstructed string is required, pass it as `"$INPUT"` rather than `$INPUT`. Add tests covering spaces, `*`, `?`, bracket expressions, leading hyphens, and empty input. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:5
Finding

Undocumented Persistent Plaintext Storage of User Input and Activity

Content
View full analysis
> "$DATA_DIR/history.log"; } ``` ```bash cmd_add() { echo "$(date +%Y-%m-%d) $*" >> "$DB"; echo " Added: $*" _log "add" "${1:-}" } ``` The remaining command handlers also invoke `_log`, including `run`, `config`, `status`, `init`, `list`, `remove`, `search`, `export`, and `info`. ### Technical Analysis The utility creates a persistent data directory and records user-provided content in predictable plaintext files: - `data.log` stores the complete argument string supplied to `add`. - `history.log` stores command activity and, for several commands, the first user-supplied argument. The project documentation mentions the configurable data directory but does not disclose activity logging, retention behavior, or the potential storage of user input. No explicit restrictive file mode, retention limit, deletion facility, or sensitive-data filtering is applied. Effective access permissions depend on the caller's environment and `umask`. The behavior is not system-level persistence or an agent-memory poisoning mechanism: it does not install startup hooks or inject rules into an AI agent's memory. The issue is insecure and insufficiently disclosed local data handling. ### Attack Path 1. A user invokes `add`, `run`, `search`, or another logged command with confidential or identifying text. 2. The script creates the configured data directory if it does not exist. 3. `cmd_add` writes complete input to `data.log`, while `_log` writes command metadata and selected input to `history.log`. 4. The files remain on disk after the command ...[truncated 762 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/script.sh:62
Finding

User-Controlled Search Pattern Can Be Interpreted as a grep Option

Content
View full analysis
/dev/null || echo " Not found: $1" _log "search" "${1:-}" } ``` ### Technical Analysis Although `"$1"` is quoted and therefore does not permit shell metacharacter injection, it appears in a position where `grep` still accepts command-line options. A search value beginning with `-` may be interpreted as an option rather than as the intended pattern. Depending on the supplied value and `grep` implementation, this can change matching behavior, trigger recursive searches, produce excessive output, or cause avoidable resource consumption. Regular-expression metacharacters are also active, which may be undesirable if the command is intended to perform literal searches. ### Attack Path 1. An attacker or untrusted caller controls the argument passed to `meme-generator search`. 2. The caller supplies a leading-hyphen value that is valid as a `grep` option. 3. `grep` parses that value as an option because no `--` end-of-options marker is present. 4. The resulting operation differs from the documented search behavior and may inspect unintended paths or consume additional resources, depending on the option and environment. 5. Any resulting matches or errors are returned through the command's output, except for standard errors redirected to `/dev/null`. ### Impact Assessment Execution remains limited to the privileges of the invoking user. This flaw does not provide direct privilege escalation or arbitrary shell-command execution. Its scope is alteration of `grep` behavior, potentially causing unintended local searches, output disclosure, denial of service through expensive matching, or incorrect results. ]]>
Remediation
View remediation
/dev/null || echo " Not found: $1" _log "search" "${1:-}" } ``` If searches are intended to be literal rather than regular-expression based, use fixed-string matching: ```bash grep -Fi -- "$1" "$DB" ``` Also validate that a search argument is present and handle a missing database file separately so operational errors are not incorrectly reported as ordinary “not found” results. ]]>
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose says this skill generates meme captions and helps pick meme templates/reaction formats. The actual code is a multi-purpose command-line data manager with CRUD-like operations over a local log file and history file. There is no logic for caption generation, template selection, trend analysis, or reaction formatting. Its primary purpose is materially different from the description, so this is a clear mismatch.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script's actual behavior is a generic local data logger/manager, not a meme caption or template generator as described in the skill metadata. This capability mismatch is dangerous because it can mislead users and host systems into granting trust or access to a tool that silently stores and searches user-provided data, creating a strong indicator of deceptive packaging or covert data collection.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The description uses broad activation language such as generating meme text, picking templates, and crafting captions, which could match ordinary user requests and cause the skill to trigger too eagerly. Overbroad triggering can route unrelated conversations into the skill, increasing the chance of unintended tool use, data exposure to the skill, or user confusion about why it activated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The line '专为中文用户设计,理解中国市场和文化' frames the skill as specifically for Chinese users and market context, which is a locale/language constraint. The file does not clearly offer user choice or opt-in for other languages or locales, making this a natural-language policy concern.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file self-describes as a 'Multi-purpose utility tool,' which directly contradicts the stated meme-generator identity. In a security review, this inconsistency is a red flag because deceptive or mislabeled tooling can hide unauthorized functions behind an innocuous skill name, increasing the risk of misuse and reducing informed user consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The logging helper writes command arguments into a persistent history file without any disclosure, which can capture sensitive prompts, filenames, search terms, or other user data. Hidden persistence is dangerous in an agent skill because users may reasonably expect ephemeral processing for meme generation, not background retention of inputs on disk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The add command stores arbitrary user-provided content in a persistent database file with no notice that the data will be retained. In the context of a purported meme generator, this undisclosed storage increases privacy risk and can lead to accidental collection of sensitive or proprietary text entered by users.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.