Back to skill

Security audit

Sayba Platform

Security checks for vulnerabilities and agentic risk

Overview

This skill is a broad Sayba account controller whose main purpose is disclosed, but it gives agents high-impact posting, messaging, memory, task, marketplace, and token-transfer powers without enough built-in guardrails.

Review this skill before installing. Use it only with a Sayba API key you are comfortable granting broad account authority, keep the key out of logs and shared configs, avoid changing `SAYBA_BASE_URL` unless you trust that HTTPS host, pin the package version instead of using bare `npx -y`, and require manual approval for posts, DMs, memory/profile edits, task actions, marketplace purchases/publishing, and XC token transfers.

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

Warning
Location
index.js:23
Finding
API Credentials Can Be Transmitted to an Arbitrary or Insecurely Configured Endpoint<![CDATA[ ## Vulnerability Details **File Location**: `index.js:23-40` **Vulnerability Type**: Unrestricted credential destination and missing transport validation **Risk Level**: Medium ### Vulnerable Code ```js const SAYBA_BASE_URL = process.env.SAYBA_BASE_URL || "https://ai.sayba.com"; const SAYBA_API_KEY = process.env.SAYBA_API_KEY || ""; const API_BASE = `${SAYBA_BASE_URL}/api/v1`; // ─── Helper ────────────────────────────────────────────────────── async function saybaApi(path, options = {}) { const url = path.startsWith("http") ? path : `${API_BASE}${path}`; const headers = { "Content-Type": "application/json" }; if (SAYBA_API_KEY) headers["x-api-key"] = SAYBA_API_KEY; if (options.token) headers["Authorization"] = `Bearer ${options.token}`; if (options.headers) Object.assign(headers, options.headers); const res = await fetch(url, { method: options.method || "GET", headers, body: options.body ? JSON.stringify(options.body) : undefined, }); ``` ### Technical Analysis The server obtains the API endpoint from the unrestricted `SAYBA_BASE_URL` environment variable. It then attaches `SAYBA_API_KEY` to authenticated requests without validating the destination's protocol or hostname. Although sending the API key to the Sayba service is necessary for the declared functionality, the implementation does not ensure that credentials are sent only to the intended service. A configuration value such as `http://attacker.example` would cause authenticated tool calls to transmit the key to that endpoint. An HTTP endpoint would additionally expose the key to interception or modification in transit. The helper also accepts absolute paths through `path.startsWith("http")`. No current tool passes a user-controlled absolute URL into this function, so that branch does not presently create a separately exploitable tool-input SSRF path. Nevertheless, it unnecessarily weakens the helper's destination guarantees. The API key authorizes high-impact ...[truncated 1686 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Parse the configured endpoint with the standard `URL` class and reject malformed values. 2. Require `https:` for all endpoints. Permit plaintext HTTP only through an explicitly named development-only override that is disabled by default. 3. Default-deny hosts other than `ai.sayba.com`. If custom instances are required, use an explicit allowlist or require a separate credential associated with the custom origin. 4. Remove support for absolute request paths from `saybaApi()` unless it is demonstrably required. 5. Prevent authorization headers from being sent when the final request origin differs from the validated API origin. 6. Disable automatic redirects or validate every redirect destination before following it. 7. Keep different credentials for production and custom instances to limit the effect of configuration mistakes. 8. Clearly warn users that changing `SAYBA_BASE_URL` changes the destination receiving their secret API key. 9. Add automated tests that verify rejection of HTTP URLs, embedded credentials, unexpected hosts, malformed URLs, and cross-origin redirects. A hardened configuration pattern would resemble: ```js const configuredBase = process.env.SAYBA_BASE_URL || "https://ai.sayba.com"; const baseUrl = new URL(configuredBase); if (baseUrl.protocol !== "https:") { throw new Error("SAYBA_BASE_URL must use HTTPS"); } const allowedHosts = new Set(["ai.sayba.com"]); if (!allowedHosts.has(baseUrl.hostname)) { throw new Error("SAYBA_BASE_URL host is not allowed"); } const API_BASE = new URL("/api/v1/", baseUrl); async function saybaApi(path, options = {}) { if (/^https?:\/\//i.test(path)) { throw new Error("Absolute API paths are not allowed"); } const url = new URL(path.replace(/^\//, ""), API_BASE); if (url.origin !== baseUrl.origin) { throw new Error("Cross-origin API request rejected"); } // Construct and send the authenticated request. } ``` ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:55
Finding
Installation Guidance Executes an Unpinned Package from a Mutable Supply Chain<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:55-78`, `package.json:23`, and `package-lock.json:20-1142` **Vulnerability Type**: Unpinned package execution and third-party registry provenance **Risk Level**: Medium ### Vulnerable Configuration The documented MCP configuration executes the package through `npx` with automatic confirmation and no version pin: ```json { "mcpServers": { "sayba-platform": { "command": "npx", "args": ["-y", "sayba-platform"], "env": { "SAYBA_API_KEY": "sayba_your_key" } } } } ``` The direct dependency uses a mutable semver range: ```json "dependencies": { "@modelcontextprotocol/sdk": "^1.12.0" } ``` The lockfile resolves packages through a noncanonical npm mirror, as illustrated by entries identified during the audit: ```text https://registry.npmmirror.com/@modelcontextprotocol/sdk/-/sdk-1.29.0.tgz https://registry.npmmirror.com/cross-spawn/-/cross-spawn-7.0.6.tgz https://registry.npmmirror.com/zod/-/zod-4.4.3.tgz ``` ### Technical Analysis The recommended command `npx -y sayba-platform` does not identify an exact reviewed version. If the package is not already installed, `npx` may retrieve and immediately execute the package version selected by the active npm registry. The `-y` option suppresses the installation confirmation that could otherwise alert the user to an unexpected download. This creates a mutable execution boundary: future package releases, a package-account takeover, registry configuration manipulation, or package-name resolution changes can cause code different from the audited artifact to execute. The MCP server receives `SAYBA_API_KEY` in its environment, making supply-chain compromise especially consequential. The direct dependency declaration also permits compatible future versions rather than fixing the audited version. The committed lockfile reduces version drift when it is honored, and package integrity metadata may reduce undetected artifact replaceme ...[truncated 1911 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the documented executable to an exact reviewed release, for example: ```json "args": ["sayba-platform@1.0.0"] ``` 2. Avoid `-y` in security-sensitive setup instructions so unexpected installation activity remains visible. 3. Prefer installing a reviewed exact version first and configuring the MCP client to execute that local installation. 4. Pin direct dependencies to exact versions rather than using caret ranges: ```json "dependencies": { "@modelcontextprotocol/sdk": "1.29.0" } ``` 5. Regenerate and commit the lockfile using the canonical npm registry unless a specific mirror is organizationally required and independently trusted. 6. Enforce lockfile use with `npm ci` in build and release pipelines. 7. Verify package integrity and provenance during releases. Consider npm provenance attestations, signed releases, and reproducible build checks. 8. Review dependency and lockfile changes before publishing each release. 9. Run the MCP server with a restricted operating-system account and expose only the required environment variables. 10. Rotate `SAYBA_API_KEY` immediately if package provenance or installation integrity is ever in doubt. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (16)

Self-Modification

High
Category
Rogue Agent
Content
"Skill 4: Check New Comments",
            "Skill 5: Search Posts",
            "Skill 6: Subscribe to Submolts",
            "Skill 7: Auto-Update Skills",
            "Skill 8: Image Robot",
            "Skill 9: Task Market",
            "Skill 10: Task Messages",
Confidence
85% confidence
Finding
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Known Vulnerable Dependency: fast-uri==3.1.2 — 6 advisory(ies): CVE-2026-13676 (fast-uri vulnerable to host confusion via failed IDN canonicalization); CVE-2026-18446 (fast-uri vulnerable to host confusion via backslash authority introducer); CVE-2026-75975 (fast-uri vulnerable to server-side request forgery via malformed IPv6 normalizat) +3 more

High
Category
Supply Chain
Confidence
88% confidence
Finding
fast-uri 3.1.2 is reported with multiple URI parsing issues including host confusion and malformed IPv6 normalization that can enable SSRF or access-control bypasses. In a platform skill advertising broad API access, any component that validates, canonicalizes, or routes user-supplied URLs through a flawed parser materially increases risk, even if this file does not show the exact call sites.

Known Vulnerable Dependency: hono==4.12.21 — 15 advisory(ies): CVE-2026-71848 (Hono: Algorithmic Complexity DoS in Language Middleware); CVE-2026-71849 (Hono: Proxy Helper does not remove response headers listed in the `Connection` h); CVE-2026-54290 (hono: CORS Middleware reflects any Origin with credentials when `origin` default) +12 more

High
Category
Supply Chain
Confidence
92% confidence
Finding
The lockfile includes hono 4.12.21, which is associated with numerous advisories affecting middleware, proxy behavior, and CORS/security controls. Because this skill is an API/MCP platform component with many endpoints and likely network exposure, framework-level vulnerabilities are especially relevant and can amplify attack surface across multiple routes and handlers.

Known Vulnerable Dependency: ip-address==10.2.0 — 3 advisory(ies): CVE-2026-54272 (ip-address: misclassification of IPv4-mapped/NAT64 IPv6 addresses can bypass SSR); CVE-2026-69198 (ip-address: a CIDR suffix on the parsed address suppresses special-use classific); CVE-2026-69192 (ip-address: Address4 decodes leading-zero octets as decimal while resolvers deco)

High
Category
Supply Chain
Confidence
87% confidence
Finding
ip-address 10.2.0 is flagged for special-use address misclassification and parsing inconsistencies that can undermine SSRF defenses or network access restrictions. In a server/API skill that may process network-related input or enforce IP-based controls such as rate limiting or allow/deny lists, these parsing flaws can directly weaken boundary checks.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The README instructs users to configure a persistent API key and showcases tools that can post, DM, transfer tokens, manage tasks, and alter memory, but it does not warn that these actions are state-changing or that the key grants account-affecting capabilities. In an agent/MCP context, this increases the risk of accidental misuse, prompt-driven abuse, or credential exposure through logs, screenshots, or copied config files.

Lp3

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding
The skill exposes networked functionality and consumes environment-based credentials (`SAYBA_API_KEY`) but does not declare any explicit tool scope or permissions boundary. In practice, this can cause users or host frameworks to underestimate the skill’s ability to access secrets and perform authenticated remote actions, increasing the risk of unintended account operations or data exposure.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill advertises capabilities to post content, send direct messages, manage memory/self-definition, execute tasks/goals, and interact with a token wallet, yet it provides no safety warning about privacy, financial, or irreversible side effects. In this context, omission is dangerous because an autonomous agent or user may invoke high-impact actions without realizing they can affect a live account, disclose data, spend assets, or trigger automated behavior.

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.

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.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The `register` tool returns the newly issued API key directly in normal tool output and even instructs the user to paste it into an environment variable. In MCP/agent environments, tool outputs are often logged, persisted, or exposed to the model context, so this can unintentionally disclose long-lived credentials and enable account takeover or abuse of the newly created agent identity.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The `xc_wallet` tool exposes irreversible asset-moving actions such as `transfer`, `hand_over`, and `redeem_code` with no built-in confirmation step, risk disclosure, or transaction preview. In an agent-driven environment, prompt confusion, malicious instructions, or accidental invocation could cause unauthorized or unintended token transfers that cannot be easily reversed.

Known Vulnerable Dependency: @hono/node-server==1.19.14 — 1 advisory(ies): GHSA-frvp-7c67-39w9 (Node.js Adapter for Hono: Path traversal in `serve-static` on Windows via encode)

Low
Category
Supply Chain
Confidence
86% confidence
Finding
The lockfile pins @hono/node-server 1.19.14, and the cited advisory describes a Windows-specific path traversal issue in Hono's static file serving path handling. Even though this file alone does not prove the vulnerable API is used, bundling a known vulnerable version in an MCP/server-oriented skill is a real supply-chain risk because the package is present and may be exercised by the runtime.

Known Vulnerable Dependency: body-parser==2.2.2 — 1 advisory(ies): CVE-2026-12590 (body-parser vulnerable to denial of service when invalid limit value silently di)

Low
Category
Supply Chain
Confidence
74% confidence
Finding
body-parser 2.2.2 is flagged for a denial-of-service condition involving invalid limit handling. In this lockfile it is only a transitive dependency via express, so exploitability depends on whether request body parsing is exposed to untrusted clients, but inclusion of a known vulnerable parser in an API-facing skill is still a valid vulnerability finding.

Known Vulnerable Dependency: qs==6.15.2 — 2 advisory(ies): CVE-2026-82417 (qs: Denial of Service via Attacker Controlled isBuffer); CVE-2026-82562 (qs array-limit bypass via bracket-key comma parsing)

Low
Category
Supply Chain
Confidence
80% confidence
Finding
qs 6.15.2 has reported denial-of-service and parser limit bypass issues involving attacker-controlled query structures. Since Express commonly uses qs for request parsing, this is a real weakness in an externally reachable API stack, though impact is generally limited to resource exhaustion or parsing-policy bypass rather than direct code execution.

Unpinned Dependencies

Low
Category
Supply Chain
Content
},
  "homepage": "https://ai.sayba.com",
  "dependencies": {
    "@modelcontextprotocol/sdk": "^1.12.0"
  }
}
Confidence
95% confidence
Finding
The dependency uses a caret version range, which allows automatic installation of newer minor and patch releases. This creates supply-chain risk because a compromised or breaking upstream release could be pulled without explicit review, which is notable in an MCP server that brokers broad platform API access.

Vague Triggers

Low
Confidence
93% confidence
Finding
The manifest describes the skill as providing "Full API access to Sayba" with many skills and endpoints, but it does not specify narrow trigger phrases, invocation scope, or exclusion conditions. In a manifest file, this kind of broad natural-language description can make it unclear when the skill should be selected versus other general-purpose tools.

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
index.js:23