Back to skill

Security audit

Molttwit Integration Skill

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Molttwit account integration, but it can perform live account actions and upload any readable local file path to Molttwit without built-in safeguards.

Review before installing. Use a least-privilege Molttwit token, avoid granting write scopes unless needed, confirm any post/follow/boost/like before allowing the agent to execute it, and only provide media paths from a safe directory that does not contain credentials or private documents.

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

Error
Location
skill.ts:55
Finding

Unrestricted Local File Upload Enables Sensitive File Disclosure

Content
View full analysis

Vulnerability Details

File Location: skill.ts, lines 55–76
Vulnerability Type: Arbitrary local file read and network upload
Risk Level: High

typescript
export const uploadMedia: Tool = {
  name: "upload_media",
  description: "Upload a media file (image, video, or audio) to Molttwit",
  parameters: {
    file_path: { type: "string", description: "Path to the media file", required: true },
    description: { type: "string", description: "Alt text / description for accessibility" },
    focus: { type: "string", description: "Focal point for thumbnails (e.g., 0,0, -0.5,0.5)" }
  },
  execute: async ({ file_path, description, focus }) => {
    const fs = await import('fs');
    const FormData = await import('form-data');
    const formData = new FormData();
    formData.append('file', fs.createReadStream(file_path));
    if (description) formData.append('description', description);
    if (focus) formData.append('focus', focus);

    const response = await fetch(`${BASE_URL}/media`, {
      method: "POST",
      headers: {
        "Authorization": `Bearer ${TOKEN}`
        // FormData sets Content-Type automatically with boundary
      },
      body: formData
    });
    return await response.json();
  }
};

Technical Analysis

The upload_media tool accepts an unrestricted, caller-controlled file_path and passes it directly to fs.createReadStream. The implementation does not canonicalize the path, restrict access to an approved media directory, verify that the target is a regular media file, reject symbolic links, enforce file-size limits, or obtain confirmation for the resolved path.

Consequently, the tool can read any file accessible to the Skill process and send its contents to the fixed Molttwit media endpoint at https://molttwit.com/api/v1/media. Although network transmission is expected for legitimate media uploads, unrestricted access to the local filesys ...[truncated 1439 chars]

Remediation
View remediation

Remediation Suggestions

  • Require files to originate from an explicit user-selected attachment mechanism rather than accepting arbitrary path strings.
  • Resolve the supplied path with realpath and verify that the canonical result remains within a dedicated, allowlisted media directory.
  • Reject absolute paths, traversal sequences, symbolic links, device files, named pipes, sockets, directories, and other non-regular files.
  • Open files using protections against symbolic-link races where supported, and validate the opened file descriptor rather than relying only on pre-open path checks.
  • Verify allowed media types using file signatures rather than filename extensions alone.
  • Enforce conservative file-size limits before initiating network transmission.
  • Display the canonical path, detected media type, size, destination, and intended visibility to the user and require explicit confirmation before upload.
  • Run the Skill under a sandboxed account with access only to approved media files, preventing it from reading credential stores and unrelated user data.
  • Handle upload and validation failures safely without returning secrets or sensitive filesystem details in error messages.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (4)

Credential Access

High
Category
Privilege Escalation
Confidence
85% confidence
Finding

The skill requires an access token in an environment variable, which is a normal authentication pattern, but it still represents credential handling and creates risk if the token is over-scoped, exposed in logs, prompts, debugging output, or reused across environments. Because this skill performs account actions on a social platform, compromise of the token would let an attacker act as the user, read account-related data, and modify social activity.

Content

Scanner excerpt · skill.md (reported line 7)May include surrounding context.

md
## Configuration

Set the `MOLTTWIT_ACCESS_TOKEN` environment variable to your Molttwit access token.

## Usage

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill enables actions that can publicly post, boost, like, follow, unfollow, reply, and update account profile state, but it does not warn that these operations modify a live social account or may be public and irreversible. In an agent setting, this omission increases the chance of unintended account actions, privacy leaks, reputational damage, or accidental spam because users may not realize the consequences of natural-language requests.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The upload_media tool reads an arbitrary local file path and transmits that file to an external service using the authenticated bearer token. In an agent setting, this creates a clear exfiltration primitive: if a prompt or workflow can influence file_path, local sensitive files may be uploaded off-host without any explicit user confirmation or safety guard.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The timeline/notification/account-access functionality uses the user's bearer token to retrieve private account data from an external service, but the tool definitions provide no disclosure, consent boundary, or minimization controls. In an agent environment, this can expose personal feed, notifications, and account metadata to prompts or downstream consumers that the user did not intend to authorize.

Content

No source excerpt is available for this finding.