Back to skill

Security audit

Nocodb

Security checks for vulnerabilities and agentic risk

Overview

This NocoDB skill appears legitimate, but it gives an agent broad database and admin power without enough built-in safety checks.

Review this before installing in an agent environment. Use a least-privilege NocoDB token, keep NOCODB_URL pinned to a trusted HTTPS NocoDB host, avoid running destructive commands unless the target has been listed and confirmed, and treat attachment uploads, script changes, team changes, and token creation/deletion as admin actions.

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/noco.sh:7
Finding

Unvalidated NocoDB Endpoint Can Disclose the API Token

Content
View full analysis

Vulnerability Details

File Location: scripts/noco.sh, lines 7 and 16–21
Vulnerability Type: Credential disclosure through an unrestricted configurable endpoint
Risk Level: Medium

Vulnerable Code

bash
NC_URL="${NOCODB_URL:-https://app.nocodb.com}"
NC_TOKEN="${NOCODB_TOKEN:-}"
NC_VERBOSE="${NOCODB_VERBOSE:-0}"

[[ -z "$NC_TOKEN" ]] && { echo "NOCODB_TOKEN required" >&2; exit 1; }

# Verbose helper - shows resolved IDs
_v() { [[ "$NC_VERBOSE" == "1" ]] && echo "→ $*" >&2 || true; }

###############################################################################
# HTTP helpers
###############################################################################
_get()    { curl -sS -H "xc-token: $NC_TOKEN" "$NC_URL/api/v3/$1"; }
_post()   { curl -sS -X POST -H "xc-token: $NC_TOKEN" -H "Content-Type: application/json" "$NC_URL/api/v3/$1" -d "${2:-}"; }
_patch()  { curl -sS -X PATCH -H "xc-token: $NC_TOKEN" -H "Content-Type: application/json" "$NC_URL/api/v3/$1" -d "${2:-}"; }
_put()    { curl -sS -X PUT -H "xc-token: $NC_TOKEN" -H "Content-Type: application/json" "$NC_URL/api/v3/$1" -d "${2:-}"; }
_delete() { curl -sS -X DELETE -H "xc-token: $NC_TOKEN" -H "Content-Type: application/json" "$NC_URL/api/v3/$1" ${2:+-d "$2"}; }
_upload() { curl -sS -X POST -H "xc-token: $NC_TOKEN" -F "file=@$2" "$NC_URL/api/v3/$1"; }

Technical Analysis

The script accepts NOCODB_URL without validating its scheme, host, embedded credentials, or destination. Every HTTP helper then sends the value of NOCODB_TOKEN in the xc-token request header to that endpoint.

Custom endpoints are legitimate for self-hosted NocoDB deployments, but the implementation does not establish a minimum transport-security policy. It accepts arbitrary destinations and plain HTTP URLs. Consequently, a mistaken or attacker-influenced environment value can cause the credential to be transmitted to an attacker-controlled server. When HTTP is used, network-positioned attackers may als ...[truncated 1438 chars]

Remediation
View remediation

Remediation Suggestions

  1. Parse and validate NOCODB_URL before making any request.
  2. Require HTTPS by default and reject all other schemes.
  3. Permit plain HTTP only through an explicit development override restricted to loopback hosts such as localhost, 127.0.0.1, and [::1].
  4. Reject malformed URLs, embedded user information, fragments, unexpected control characters, and ambiguous host representations.
  5. Consider an explicit allowlist for approved NocoDB hosts. At minimum, require confirmation or a dedicated opt-in flag when using a host other than the default.
  6. Normalize the configured URL and remove trailing slashes before appending API paths.
  7. Preserve TLS certificate verification and do not add insecure curl options such as -k or --insecure.
  8. Use narrowly scoped, least-privilege API tokens and rotate a token immediately if it may have been transmitted to an untrusted destination.
  9. Document that changing NOCODB_URL changes the recipient of the API credential and should only be done for trusted NocoDB deployments.
  10. Add automated tests confirming rejection of plain HTTP remote endpoints, embedded credentials, malformed URLs, and unauthorized hosts.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill documents and encourages use of a shell-based CLI (nc) but does not declare any permissions or allowed-tools scope. In an agent environment, this can cause the model to invoke shell capabilities without explicit policy boundaries, increasing the chance of unintended command execution against live databases.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The setup section instructs users to export NOCODB_TOKEN and describes token creation, but it does not warn that the token is a sensitive credential that grants API access. In an agent or shared shell context, this can lead to accidental disclosure through logs, shell history, screenshots, or misuse by downstream commands.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill prominently includes destructive operations like workspace:delete, base:delete, and similar commands without any warning, confirmation guidance, or safety note. In an agent-assisted workflow, this increases the risk that a user request is translated directly into irreversible deletion of production data or configuration.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · scripts/noco.sh (reported line 19)May include surrounding context.

sh
###############################################################################
# HTTP helpers
###############################################################################
_get()    { curl -sS -H "xc-token: $NC_TOKEN" "$NC_URL/api/v3/$1"; }
_post()   { curl -sS -X POST -H "xc-token: $NC_TOKEN" -H "Content-Type: application/json" "$NC_URL/api/v3/$1" -d "${2:-}"; }
_patch()  { curl -sS -X PATCH -H "xc-token: $NC_TOKEN" -H "Content-Type: application/json" "$NC_URL/api/v3/$1" -d "${2:-}"; }
_put()    { curl -sS -X PUT -H "xc-token: $NC_TOKEN" -H "Content-Type: application/json" "$NC_URL/api/v3/$1" -d "${2:-}"; }

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The attachment upload helper reads a local file path and sends the file contents to the remote NocoDB service via multipart upload. In an agent setting, this is sensitive because a model or user could cause unintended exfiltration of local files, and the script does not provide any explicit warning, path restriction, or upload consent boundary.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The CLI exposes destructive delete operations directly with no confirmation prompt, dry-run mode, or safety interlock. Because many commands accept names that are auto-resolved to IDs, a mistaken selection or prompt-injection-driven instruction could delete the wrong workspace, base, table, field, or records immediately.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill exposes API token listing, creation, and deletion even though the manifest description only mentions managing NocoDB databases, workspaces, bases, tables, fields, views, records, attachments, and team management. This scope expansion is security-relevant because token management enables credential lifecycle changes and can create or revoke access beyond ordinary data operations, increasing the blast radius if the skill is misused or over-permissioned.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill implements script management commands that are not described in the manifest. In NocoDB, scripts can be privileged automation artifacts, so undisclosed support for creating, updating, or deleting them broadens the operational scope and may surprise users or upstream policy controls that rely on the manifest for risk understanding.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.