Back to skill

Security audit

Memberstack CLI

Security checks for vulnerabilities and agentic risk

Overview

This Memberstack CLI skill is purpose-aligned, but it should be reviewed carefully because it can run unpinned external CLI code and perform high-impact account and data changes with incomplete safeguards.

Install only if you are comfortable with a skill that can administer a Memberstack account. Prefer installing a reviewed, pinned CLI version instead of relying on `npx`; avoid putting member passwords directly in commands or long-lived import files; use sandbox first; review live, bulk, import/export, and delete commands manually before approving them.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T08 · Insecure Dependencies

Warning
Location
scripts/run_memberstack.py:52
Finding

Unpinned npm Package Is Downloaded and Executed Through npx

Content
View full analysis
list[str]: which = shutil.which("memberstack-cli") or shutil.which("memberstack") if which: return [which] return ["npx", "memberstack-cli"] ``` ```python cmd_parts = find_cli() + args try: result = subprocess.run( cmd_parts, capture_output=True, text=True, timeout=60, ) ``` Related installation and authentication instructions also use an unpinned package: ```bash npx memberstack-cli auth login npm install -g memberstack-cli ``` ### Technical Analysis When no local `memberstack-cli` or `memberstack` executable is available, the wrapper falls back to `npx memberstack-cli`. No package version, lockfile, integrity hash, or publisher verification is specified. Depending on the local npm/npx configuration and cache state, `npx` can retrieve the current package release from the configured npm registry and execute its lifecycle or runtime code. Consequently, the code ultimately executed can change after this Skill has been reviewed. This is a supply-chain trust issue rather than evidence that the currently referenced package is malicious. However, a compromised publisher account, malicious future release, registry substitution, or unsafe custom npm registry could turn an apparently legitimate Skill invocation into arbitrary local code execution. ### Attack Path 1. The host does not have a local `memberstack-cli` or `memberstack` executable. 2. The user or Agent invokes `scripts/run_memberstack.py`. 3. `find_cli()` selects `npx memberstack-cli`. 4. `npx` resolves the unpinned package through the configured npm registry. 5. An attacker-controlled or compromised package release is downloaded and executed. 6. The package runs with the privil ...[truncated 876 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/members.md:61
Finding

Member Passwords Are Exposed Through Process Command-Line Arguments

Content
View full analysis
` | Member email address | Yes | | `--password ` | Member password | Yes | | `--plans ` | Plan ID to connect (repeatable) | No | | `--custom-fields ` | Custom field value (repeatable) | No | | `--meta-data ` | Metadata field value (repeatable) | No | | `--login-redirect ` | Login redirect URL | No | Examples [#examples-2] ```bash memberstack members create --email user@example.com --password secure123 memberstack members create \ --email user@example.com \ --password secure123 \ --plans pln_abc123 \ --custom-fields tier=premium \ --meta-data ref=partner ``` ``` The wrapper forwards all arguments to the child process without protecting password values: ```python args = sys.argv[1:] if check_for_sensitive_args(args): sys.exit(1) confirmed = "--confirmed" in args cli_args = [a for a in args if a != "--confirmed"] if is_destructive(cli_args) and not confirmed: env_label = "LIVE" if uses_live_flag(cli_args) else "SANDBOX" print(f"DESTRUCTIVE COMMAND detected ({env_label} environment):") print(f" memberstack {' '.join(cli_args)}") print() print("Confirm with the user before proceeding.") print("Re-run with --confirmed afte ...[truncated 2434 chars]
Remediation
View remediation
` with a hidden interactive prompt using a mechanism such as Python's `getpass`, or accept the secret through protected standard input. 2. If automation is required, use a restricted file descriptor or another secret-injection mechanism that does not place the value in the process argument vector. 3. Redact password options before displaying, logging, or reconstructing commands. Never print the value following `--password`. 4. Update all documentation to prohibit plaintext passwords in shell commands and remove realistic password examples. 5. For member import files containing passwords: - Require owner-only file permissions. - Warn against storing files in shared directories or source control. - Recommend encrypted storage while at rest. - Delete temporary imports promptly after successful processing. - Avoid generating reusable default passwords where possible. 6. Consider using password-setup or invitation links so that members choose their own passwords through an authenticated, time-limited flow. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/run_memberstack.py:21
Finding

Confirmation and Production-Mutation Safeguards Are Incomplete

Content
View full analysis
bool: if len(args) < 2: return False cmd_pair = (args[0], args[1]) return cmd_pair in DESTRUCTIVE_COMMANDS def uses_live_flag(args: list[str]) -> bool: return "--live" in args ``` Confirmation is represented by an unrestricted argument: ```python args = sys.argv[1:] if check_for_sensitive_args(args): sys.exit(1) confirmed = "--confirmed" in args cli_args = [a for a in args if a != "--confirmed"] if is_destructive(cli_args) and not confirmed: env_label = "LIVE" if uses_live_flag(cli_args) else "SANDBOX" print(f"DESTRUCTIVE COMMAND detected ({env_label} environment):") print(f" memberstack {' '.join(cli_args)}") print() print("Confirm with the user before proceeding.") print("Re-run with --confirmed after user approval:") print(f" python run_memberstack.py {' '.join(cli_args)} --confirmed") print("--- COMMAND NOT EXECUTED (requires confirmation) ---") sys.exit(2) args = cli_args ``` ### Technical Analysis The wrapper describes itself as enforcing confirmation for destructive operations and the Skill instructs the Agent never to switch to the live ...[truncated 2609 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (46)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says this skill should use the Memberstack CLI to authenticate and manage Memberstack apps, members, plans, custom fields, data tables, and records. However, the supplied code does not invoke Memberstack, call any external CLI, perform authentication, or manage remote accounts/data. Its actual purpose is a local reference-file search utility operating on markdown files under a references directory. This is a materially different primary purpose, with unrelated commands and capabilities, so the description does not accurately represent the code.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/auth.md (reported line 25)May include surrounding context.

md
Opens your default browser to the Memberstack authorization page. After you grant permission, the CLI receives an authorization code and exchanges it for access and refresh tokens using the PKCE flow.

Tokens are stored locally at `~/.memberstack/auth.json` with secure file permissions. The access token is used for authenticated requests directly to the Memberstack API, your credentials are never sent to third-party services.

Example [#example]

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/auth.md (reported line 73)May include surrounding context.

Authentication Status Status: Logged in App ID: app_abc123 Access Token: Expires in 45 minutes Refresh Token: Available Token Valid: Yes

text

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The import workflow requires plaintext password fields and provides examples without any credential-handling warning. This is dangerous because operators may create CSV/JSON files containing reusable credentials, which can be leaked via local storage, backups, logs, or version control.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The records bulk-delete section describes deleting records matching a filter, which is a high-impact destructive action, but it provides no explicit warning about permanent data loss. Even though --dry-run exists, the documentation should clearly disclose the danger of irreversible mass deletion.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill clearly instructs use of shell commands and local scripts, but it declares no explicit tool scope such as allowed tools or permissions. That omission weakens least-privilege controls and can cause the agent/runtime to grant broader capabilities than intended, especially in a skill that reads local files and executes wrappers.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger language is very broad (whenever the user wants to interact with Memberstack, plus generic phrases around membership management and member data operations), which can cause the skill to activate in contexts the user did not intend. Over-broad invocation increases the chance of unnecessary shell use, local file access, or destructive account operations being suggested in unrelated conversations.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Using npx memberstack-cli without pinning a version allows whatever package version is current at execution time to be fetched and run. This creates a supply-chain risk: a compromised or breaking upstream release could execute arbitrary code or alter behavior during authentication or account operations.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The logout command also uses unpinned npx, which still resolves and executes remote package code at runtime. Even though logout seems low risk, fetching an unexpected version can still lead to arbitrary code execution in the user's environment.

Content

No source excerpt is available for this finding.

Behavior Manipulation

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Subtle instructions detected that may alter agent decision-making or introduce hidden biases.

Content

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

Running Commands

Always use the wrapper script instead of calling memberstack-cli directly. The wrapper automatically applies the security guidelines below (e.g. boundary markers, sanitization, etc.):

bash
# Instead of: npx memberstack-cli members list --json

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding

The same line also instructs verification with npx memberstack-cli whoami, again without version pinning. While less sensitive than login, it still executes remotely resolved package code and can be abused if the package supply chain is compromised.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The security guidance recommends npx memberstack-cli auth logout when finished, but because it is unpinned it still executes runtime-fetched package code. Security sections carry extra weight because users are likely to trust them, so modeling unsafe supply-chain behavior here is more dangerous.

Content

No source excerpt is available for this finding.

Behavior Manipulation

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Subtle instructions detected that may alter agent decision-making or introduce hidden biases.

Content

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

md
## Scripts

- **`scripts/search_references.py`**: Search reference files by tag, keyword, or list all with metadata (sanitized output with boundary markers)
- **`scripts/run_memberstack.py`**: Safe wrapper for memberstack-cli that adds boundary markers around output, sanitizes untrusted API data, and blocks destructive commands until confirmed. **Always use this wrapper instead of calling `memberstack-cli` directly.**

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · references/apps.md (reported line 31)May include surrounding context.

md
Options [#options]

| Option                               | Description                                                                                                  |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `--name <name>`                      | App name                                                                                                     |
| `--stack <stack>`                    | Tech stack: `REACT`, `WEBFLOW`, `VANILLA`, `WORDPRESS`                                                       |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · references/apps.md (reported line 33)May include surrounding context.

md
| Option                               | Description                                                                                                  |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `--name <name>`                      | App name                                                                                                     |
| `--stack <stack>`                    | Tech stack: `REACT`, `WEBFLOW`, `VANILLA`, `WORDPRESS`                                                       |
| `--wordpress-page-builder <builder>` | WordPress page builder: `GUTENBERG`, `ELEMENTOR`, `DIVI`, `BEAVER_BUILDER`, `BRICKS`, `CORNERSTONE`, `OTHER` |
| `--template-id <templateId>`         | Template ID to use                                                                                           |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · references/apps.md (reported line 36)May include surrounding context.

md
| `--name <name>`                      | App name                                                                                                     |
| `--stack <stack>`                    | Tech stack: `REACT`, `WEBFLOW`, `VANILLA`, `WORDPRESS`                                                       |
| `--wordpress-page-builder <builder>` | WordPress page builder: `GUTENBERG`, `ELEMENTOR`, `DIVI`, `BEAVER_BUILDER`, `BRICKS`, `CORNERSTONE`, `OTHER` |
| `--template-id <templateId>`         | Template ID to use                                                                                           |

Example [#example]

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file documents an app deletion command but provides no warning that the action is destructive or may affect user data/system state. Under the markdown criteria for missing user warnings, commands that can impact system integrity should disclose the risk so users understand the consequence before running them.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file documents a custom-fields delete command and provides a direct example invocation, but it does not warn that deleting a custom field is destructive or potentially irreversible. Under the markdown-file criteria for SQP-2, destructive actions that can affect user data or system integrity should include an explicit warning.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The guide demonstrates member export and import operations without any caution about the sensitivity of member data, secure storage of exported files, or validation before re-importing. In a CLI focused on membership management, this can normalize unsafe handling of personally identifiable or account-related data and increase the chance of accidental exposure or misuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file documents memberstack members delete <id> as a direct deletion operation but provides no warning that the action is destructive or irreversible. Under the markdown criteria for missing user warnings, skills should disclose behaviors that could affect user data or system integrity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The documentation explicitly instructs exporting member data to local files without warning that the output may contain sensitive personal and account metadata. In a membership-management context, this increases the risk of inadvertent data exposure through insecure storage, accidental commits, or sharing of exported files.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

Although --dry-run is documented, the skill description does not explicitly warn that this command can apply large-scale changes to user records when run without --dry-run. For markdown safety disclosures, potentially high-impact data modification workflows should include a warning about their effect.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The documentation describes adding a plan to multiple members, including --filter all, but does not warn that this may affect all matching accounts and alter access or billing-related entitlements at scale. This omission fits the markdown missing-warning category for system- and data-impacting behaviors.

Content

No source excerpt is available for this finding.