Back to skill

Security audit

NetPad - Build forms, workflows and manage MongoDB data

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed NetPad management helper, but it grants broad live account authority with destructive commands, sensitive submission export, RBAC changes, an unpinned global CLI install, and an unrestricted API base URL.

Use this only with a least-privilege NetPad API key and preferably a test project first. Verify every form, submission, organization, user, group, and role ID before allowing deletes or RBAC changes; export submissions only when you are prepared to handle sensitive data. Avoid arbitrary NETPAD_BASE_URL values, and pin or otherwise verify the @netpad/cli package before installing it globally.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/netpad.sh:7
Finding

Bearer Token Disclosure Through an Unrestricted Configurable API Endpoint

Content
View full analysis

Vulnerability Details

File Location: scripts/netpad.sh, lines 7–34
Vulnerability Type: Credential exfiltration through an unvalidated destination
Risk Level: High

Vulnerable Code

bash
BASE_URL="${NETPAD_BASE_URL:-https://www.netpad.io/api/v1}"

# Check credentials
if [[ -z "${NETPAD_API_KEY:-}" ]]; then
    echo "Error: NETPAD_API_KEY must be set" >&2
    echo "  export NETPAD_API_KEY=np_live_xxx" >&2
    exit 1
fi

# API request helper
api() {
    local method="$1"
    endpoint="$2"
    data="${3:-}"
    
    local args=(
        --silent
        --header "Authorization: Bearer ${NETPAD_API_KEY}"
        --header "Content-Type: application/json"
        -X "$method"
    )
    
    if [[ -n "$data" ]]; then
        args+=(--data "$data")
    fi
    
    curl "${args[@]}" "${BASE_URL}${endpoint}"
}

Technical Analysis

The script permits NETPAD_BASE_URL to replace the official NetPad API origin without validating its scheme, hostname, port, or trust level. The api helper then unconditionally adds NETPAD_API_KEY as a bearer token to every request sent to that origin.

Consequently, an attacker who can influence the process environment can redirect authenticated requests to an attacker-controlled server. The shell argument arrays prevent ordinary shell-command injection, but they do not prevent credential disclosure at the HTTP layer.

The same redirected request may contain sensitive request bodies, including form definitions or submission data. Restricting the default URL to HTTPS is insufficient because the environment variable can replace the complete destination.

Attack Path

  1. The attacker influences the environment used to launch the wrapper, such as through a compromised shell profile, CI variable, task configuration, or wrapper script.
  2. The attacker sets NETPAD_BASE_URL to an HTTPS endpoint under their control:
    bas

...[truncated 1146 chars]

Remediation
View remediation

Remediation Suggestions

  1. Allowlist the exact official origin and require HTTPS:
    bash
    DEFAULT_BASE_URL="https://www.netpad.io/api/v1"
    BASE_URL="${NETPAD_BASE_URL:-$DEFAULT_BASE_URL}"
    
    case "$BASE_URL" in
      "$DEFAULT_BASE_URL") ;;
      *)
        echo "Error: untrusted NETPAD_BASE_URL" >&2
        exit 1
        ;;
    esac
    
  2. If staging or self-hosted deployments must be supported, maintain an explicit allowlist of trusted HTTPS origins rather than accepting arbitrary URLs.
  3. Parse and validate the URL structurally, rejecting non-HTTPS schemes, embedded credentials, unexpected ports, fragments, and hostnames that only suffix-match a trusted domain.
  4. Require separate credentials for each configured origin. Do not reuse or forward a production token when a custom base URL is selected.
  5. Consider requiring an explicit command-line confirmation for non-production destinations and suppressing credentials unless the destination has been approved.
  6. Rotate any API key that may already have been used while NETPAD_BASE_URL pointed to an untrusted endpoint.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:305
Finding

Unpinned Global Installation of a Third-Party npm CLI

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 305
Additional Locations: SKILL.md, lines 5 and 16; references/cli-commands.md, line 3
Vulnerability Type: Unpinned third-party dependency and unsafe global installation
Risk Level: Medium

Vulnerable Code

bash
Install: `npm i -g @netpad/cli`

The same unpinned installation pattern is also presented elsewhere:

bash
npm i -g @netpad/cli

Technical Analysis

The documentation instructs users to install the latest version of @netpad/cli globally from the npm registry. No exact version, integrity digest, lockfile, registry restriction, or provenance-verification procedure is supplied.

Dependency resolution therefore occurs at installation time and may retrieve a version that did not exist when this skill was audited. npm installation can execute package lifecycle scripts, while subsequent use executes the installed CLI itself. Global installation also makes the executable available broadly in the user's environment.

This creates a supply-chain exposure if the package publisher account, npm package, registry resolution, or a future package release is compromised. The repository does not itself contain evidence that the current package is malicious; the vulnerability is the unsafe and non-reproducible dependency acquisition method.

Attack Path

  1. An attacker compromises the upstream @netpad/cli package, its publisher credentials, or the package publication process.
  2. The attacker publishes a malicious version under the legitimate package name.
  3. A user follows the documented command:
    bash
    npm i -g @netpad/cli
    
  4. npm resolves the attacker-controlled latest version because no reviewed version is pinned.
  5. Malicious lifecycle code may execute during installation, or malicious CLI code executes when the user later runs netpad.
  6. The malicious package can access resources available to th ...[truncated 683 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin the CLI to an exact version that has been reviewed:
    bash
    npm install --global @netpad/cli@<reviewed-exact-version>
    
  2. Record and verify package integrity and npm provenance before installation.
  3. Document the expected publisher, registry, package version, and checksum so users can detect unexpected resolution.
  4. Prefer a project-local dependency with a committed lockfile over global installation where operationally possible.
  5. Disable lifecycle scripts during installation when the package does not require them:
    bash
    npm install --global --ignore-scripts @netpad/cli@<reviewed-exact-version>
    
  6. Avoid running npm as root or with sudo; install and execute the CLI with least privilege.
  7. Establish a controlled update process in which new versions are reviewed and tested before changing the documented pin.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (20)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The description overstates the implemented functionality. The code supports forms and submissions management and a health check, and also lists projects. However, it does not contain any commands for managing users, groups, roles, or other RBAC resources, nor any marketplace/app installation functionality. That makes the declared description inaccurate relative to the actual code behavior. The extra project-listing capability is minor but still undeclared.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

This delete operation directly interpolates a user-controlled form ID into a privileged destructive API call with no validation, authorization narrowing, or secondary confirmation. In an agent-exposed skill, tool parameter abuse is realistic because an attacker can induce the agent to supply a different resource ID than intended, leading to unauthorized or unintended deletion of arbitrary forms accessible to the API key.

Content

Scanner excerpt · scripts/netpad.sh (reported line 73)May include surrounding context.

sh
api PATCH "/forms/${3:?Form ID required}" '{"status":"draft"}' | jq '.data | {id, name, status}'
                ;;
            delete)
                api DELETE "/forms/${3:?Form ID required}"
                echo "Form deleted"
                ;;
            add-field)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

This submission deletion call accepts free-form form and submission IDs and immediately issues a destructive request, making it susceptible to tool parameter abuse. Given the skill context includes querying and managing submissions, an attacker or faulty prompt can redirect the agent to delete the wrong user's records or records from another form that the same API key can access.

Content

Scanner excerpt · scripts/netpad.sh (reported line 118)May include surrounding context.

sh
api POST "/forms/${form_id}/submissions" "{\"data\":$data}" | jq '.'
                ;;
            delete)
                api DELETE "/forms/${3:?Form ID required}/submissions/${4:?Submission ID required}"
                echo "Submission deleted"
                ;;
            export)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill exposes shell-based capabilities (curl, jq, netpad) but does not declare any tool scope such as permissions or allowed-tools. That omission weakens policy enforcement and review because an agent may be able to perform networked and potentially destructive operations without explicit least-privilege constraints.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 67)May include surrounding context.

List Forms

bash
curl -H "Authorization: Bearer $NETPAD_API_KEY" \
  "https://www.netpad.io/api/v1/forms?status=published&pageSize=50"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill provides a direct form deletion command without any warning, confirmation step, or safeguard around irreversible data loss. In an agent context, this increases the chance of accidental destructive actions against production resources when a user request is ambiguous or misinterpreted.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documented submission deletion example enables irreversible removal of collected data with no warning or confirmation. Because this skill handles form submissions, the missing safety language makes accidental loss of business or compliance-relevant records more likely.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 227)May include surrounding context.

bash
# 1. Create draft
RESULT=$(curl -s -X POST -H "Authorization: Bearer $NETPAD_API_KEY" \
  -H "Content-Type: application/json" \
  "https://www.netpad.io/api/v1/forms" \
  -d '{"name":"Survey","projectId":"proj_xxx","fields":[...]}')

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 234)May include surrounding context.

md
FORM_ID=$(echo $RESULT | jq -r '.data.id')

# 2. Publish
curl -X PATCH -H "Authorization: Bearer $NETPAD_API_KEY" \
  -H "Content-Type: application/json" \
  "https://www.netpad.io/api/v1/forms/$FORM_ID" \
  -d '{"status":"published"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 252)May include surrounding context.

bash
for row in $(cat data.json | jq -c '.[]'); do
  curl -s -X POST -H "Authorization: Bearer $NETPAD_API_KEY" \
    -H "Content-Type: application/json" \
    "https://www.netpad.io/api/v1/forms/{formId}/submissions" \
    -d "{\"data\":$row}"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

Removing a user from an organization directly affects access control and may unexpectedly lock out legitimate users or disrupt operations. Without warnings about RBAC impact, an agent may execute the command from incomplete instructions and cause availability or governance issues.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

Deleting a group is a destructive RBAC change that can remove inherited permissions for multiple users at once. The lack of warnings or dependency checks raises the risk of broad accidental access disruption in organization management scenarios.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Deleting a custom role can invalidate assignments and break expected authorization patterns across the organization. The example lacks warnings about downstream RBAC impact, making accidental privilege loss or administrative disruption more likely.

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 describes creating and retrieving form submissions containing user-provided personal data such as name and email, plus metadata including referrer, IP address, and user agent. The documentation does not include any warning or disclosure about handling sensitive user data, privacy implications, or appropriate safeguards, which is required for markdown files when behaviors may affect user data or privacy.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file documents commands that add, update, and remove organization members, including netpad users remove, but provides no warning that these actions affect access control and could revoke user access. The same section presents the commands as routine examples without any user-facing caution about verifying the target user or organization before execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file includes netpad groups delete and netpad roles delete examples, which are destructive administrative actions, but the surrounding documentation does not warn that deletion may remove access structures or affect existing assignments. For markdown files, omission of warnings for operations that can impact system integrity or user access is in scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The form deletion path performs an irreversible DELETE immediately and then prints Form deleted, with no confirmation, dry-run mode, or safety interlock. In an agent setting, this increases the chance of accidental destructive actions from misunderstood prompts, malformed parameters, or prompt injection that tricks the agent into deleting data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The submissions export command bulk retrieves up to 1000 submissions and writes raw submission data directly to stdout without any warning, redaction, or guardrails. In this skill context, submissions are likely to contain user-provided PII or sensitive business data, so an agent or user can easily exfiltrate large volumes of data to logs, files, or downstream tools unintentionally.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest describes managing forms, submissions, users, RBAC, and marketplace app installation, but does not mention projects. The projects list command adds an extra management surface beyond the stated description, creating a small but real description-to-behavior mismatch.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest scopes the skill to forms, submissions, users/RBAC, and marketplace app installation. A standalone /health API check is operational behavior outside that stated user-facing purpose, and is not mentioned as part of the skill's capabilities.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.