Back to skill

Security audit

ftp-client-zc

Security checks for vulnerabilities and agentic risk

Overview

This FTP skill does what it says, but it ships risky credential handling, plaintext FTP, and remote file-changing actions without the approval controls it promises.

Review before installing. Use only with test or least-privilege FTP accounts, rotate any exposed credentials, avoid plaintext FTP for sensitive data, and require a real confirmation/approval gate before upload, delete, rename, or broad download operations.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
src/list.js:33
Finding

FTP Credentials and File Data Are Transmitted Without TLS

Content
View full analysis

Vulnerability Details

File Location: src/list.js:30-34, src/upload.js:49-53, src/download.js:53-57, src/delete.js:33-39, src/rename.js:34-38
Vulnerability Type: Plaintext transmission of credentials and sensitive data
Risk Level: High

Vulnerable Code

javascript
// src/list.js:30-34
const client = new ftp.Client();
client.ftp.verbose = false;
try {
    await client.access({ host, user, password, secure: false });
    const list = await client.list(remotePath);
}
javascript
// src/upload.js:49-53
const client = new ftp.Client();
client.ftp.verbose = false;
try {
    await client.access({ host, user, password, secure: false });
    await uploadFile(client, localPath, remotePath);
}
javascript
// src/download.js:53-57
const client = new ftp.Client();
client.ftp.verbose = false;
try {
    await client.access({ host, user, password, secure: false });
    await downloadFile(client, remotePath, localPath);
}
javascript
// src/delete.js:33-39
const client = new ftp.Client();
client.ftp.verbose = false;
try {
    await client.access({ host, user, password, secure: false });
    // Try to remove file first
    try {
        await client.remove(remotePath);
javascript
// src/rename.js:34-38
const client = new ftp.Client();
client.ftp.verbose = false;
try {
    await client.access({ host, user, password, secure: false });
    await client.rename(oldPath, newPath);
}

Technical Analysis

Every FTP connection explicitly sets secure: false. This disables TLS and causes the FTP control channel and data channel to operate without transport encryption. The username and password are therefore exposed during authentication, while directory listings and uploaded or downloaded file contents may also be observed or modified in transit.

FTP provides no protection against a network-positioned attacker. Disab ...[truncated 1180 chars]

Remediation
View remediation

Remediation Suggestions

  • Require FTPS by setting secure: true for every connection.
  • Enforce certificate validation and reject invalid, expired, or untrusted certificates.
  • Fail closed rather than silently falling back to plaintext FTP.
  • If legacy plaintext FTP must temporarily remain available, require an explicit high-risk configuration option and display a clear warning.
  • Prefer a protocol with secure defaults, such as SFTP, where operationally possible.
  • Rotate credentials previously used over plaintext FTP because they may already have been exposed.
  • Add automated tests that verify no production connection configuration sets secure to false.

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:28
Finding

FTP Credentials Are Embedded in Published Project Files and CLI Documentation

Content
View full analysis

Vulnerability Details

File Location: creds.json:1, SKILL.md:28
Vulnerability Type: Hardcoded and command-line credential exposure
Risk Level: High

Vulnerable Code

text
# SKILL.md:28
openclaw skill run ftp-client-zc upload --host 47.119.167.86 --user test --password zhangchong --localPath "C:\path\file.txt" --remotePath "/uploads/file.txt"

The project also includes creds.json with the same username and password as a local fallback credential.

Technical Analysis

A username and password are embedded in the audited artifact, and the documentation associates that pair with a public IP address. This creates a directly reusable credential disclosure if the values are active or have been reused elsewhere.

The presence of creds.json contradicts the documentation statement that the file should be excluded from publishing. No .npmignore or equivalent package-exclusion file appears in the audited directory structure. The documented practice of passing passwords through command-line arguments also exposes them to shell history, process inspection, terminal logging, and command auditing systems.

Attack Path

  1. An attacker downloads or otherwise obtains the Skill package.
  2. The attacker reads SKILL.md or the included creds.json.
  3. The attacker extracts the FTP host, username, and password.
  4. The attacker attempts authentication against the disclosed FTP endpoint.
  5. If the credentials are active or reused, the attacker receives the FTP account's authorized access.
  6. The attacker enumerates, downloads, uploads, changes, or deletes files according to the account permissions.

Impact Assessment

If the published values are operational, an unauthenticated party can obtain the privileges of the exposed FTP account. The resulting scope is controlled by server-side account permissions but may include disclosure of hosted files, unauthorized uploads, content replacement, file move ...[truncated 96 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove the username, password, and real public endpoint from all project files and documentation.
  • Immediately rotate the exposed password and investigate whether it was reused on other accounts or services.
  • Purge the credential from version-control history and previously published package versions where possible.
  • Replace documentation values with unmistakably nonfunctional placeholders.
  • Remove creds.json from distributable artifacts.
  • Add creds.json to .gitignore, .npmignore, and the npm files allowlist or equivalent packaging controls.
  • Add automated secret scanning to development and release pipelines.
  • Retrieve credentials only through the protected secret store and avoid accepting passwords through command-line arguments.
  • If interactive credential entry is necessary, use a non-echoing prompt or protected environment mechanism.
  • Restrict secret-file permissions to the owning account when a local secret file is unavoidable.

T05 · Unauthorized Access and Privilege Escalation

Error
Location
src/delete.js:35
Finding

Documented User Approval Is Not Enforced Before Network and Destructive Operations

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:32, src/delete.js:35-44, src/upload.js:51-54, src/download.js:55-58, src/rename.js:36-39
Vulnerability Type: Missing authorization and confirmation control
Risk Level: High

Vulnerable Code

markdown
<!-- SKILL.md:32 -->
- All network actions require explicit user approval via `/approve` before execution.
javascript
// src/delete.js:35-44
try {
    await client.access({ host, user, password, secure: false });
    // Try to remove file first
    try {
        await client.remove(remotePath);
        console.log(`File ${remotePath} deleted`);
    } catch (_) {
        // If not a file, try removing directory
        await client.removeDir(remotePath);
        console.log(`Directory ${remotePath} deleted`);
    }
javascript
// src/upload.js:51-54
try {
    await client.access({ host, user, password, secure: false });
    await uploadFile(client, localPath, remotePath);
    console.log('Upload completed');
javascript
// src/download.js:55-58
try {
    await client.access({ host, user, password, secure: false });
    await downloadFile(client, remotePath, localPath);
    console.log('Download completed');
javascript
// src/rename.js:36-39
try {
    await client.access({ host, user, password, secure: false });
    await client.rename(oldPath, newPath);
    console.log(`Renamed ${oldPath} -> ${newPath}`);

Technical Analysis

The security documentation claims that all network actions require explicit approval through /approve, but none of the operation scripts requests, validates, or consumes an approval decision. Once invoked, each script parses its arguments, connects to the server, and immediately performs the requested action.

This is especially dangerous for delete, upload, download, and rename operations because they can destroy data, replace content, di ...[truncated 1283 chars]

Remediation
View remediation

Remediation Suggestions

  • Implement a real approval check in code before opening any network connection.
  • Require a second explicit confirmation for destructive actions and operations that overwrite existing files.
  • Bind approval to the exact action, host, local path, remote path, and relevant overwrite behavior so that approval cannot be reused for a different operation.
  • Use a short-lived, non-replayable approval token issued by the trusted host environment.
  • Fail closed if the approval service is unavailable, the token is invalid, or any approved parameter differs from the requested operation.
  • Display the resolved source and destination paths before approval.
  • Apply least-privilege FTP credentials, preferably using separate read-only and write-capable accounts.
  • Add tests proving that every operation exits without network or filesystem side effects when approval is absent.
  • Ensure documentation accurately describes the implemented control rather than relying on an external convention that the scripts do not enforce.

T08 · Insecure Dependencies

Warning
Location
package-lock.json:15
Finding

Dependency Lockfile Uses a Third-Party Package Registry Mirror

Content
View full analysis

Vulnerability Details

File Location: package-lock.json:15-34
Vulnerability Type: Unsafe dependency source and supply-chain exposure
Risk Level: Medium

Vulnerable Code

json
"node_modules/basic-ftp": {
  "version": "5.3.0",
  "resolved": "https://registry.npmmirror.com/basic-ftp/-/basic-ftp-5.3.0.tgz",
  "integrity": "sha512-5K9eNNn7ywHPsYnFwjKgYH8Hf8B5emh7JKcPaVjjrMJFQQwGpwowEnZNEtHs7DfR7hCZsmaK3VA4HUK0YarT+w==",
  "license": "MIT",
  "engines": {
    "node": ">=10.0.0"
  }
},
"node_modules/minimist": {
  "version": "1.2.8",
  "resolved": "https://registry.npmmirror.com/minimist/-/minimist-1.2.8.tgz",
  "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
  "license": "MIT",
  "funding": {
    "url": "https://github.com/sponsors/ljharb"
  }
}

Technical Analysis

The lockfile resolves both runtime dependencies through registry.npmmirror.com rather than the official npm registry. This adds a third party to the dependency trust chain. Integrity hashes provide useful protection against unintended content changes under the current lockfile, but they do not eliminate concerns about registry availability, provenance, or a maliciously modified lockfile.

No evidence in the reviewed code shows that either locked dependency is itself malicious. The confirmed issue is the use of an additional third-party distribution source for executable dependencies.

Attack Path

  1. A developer or deployment system installs dependencies using the committed lockfile.
  2. The package manager retrieves dependency archives from the third-party mirror.
  3. If the mirror, resolution infrastructure, or lockfile update process is compromised, malicious package content or maliciously changed integrity metadata may be introduced.
  4. The dependency is installed into the project.
  5. Malicious dependency code can execute when imported by t ...[truncated 585 chars]
Remediation
View remediation

Remediation Suggestions

  • Regenerate the lockfile using the official npm registry at https://registry.npmjs.org/.
  • Continue retaining cryptographic integrity hashes for every dependency.
  • Install with a lockfile-enforcing command such as npm ci in automated builds.
  • Pin reviewed dependency versions and require review for all lockfile changes.
  • Use a trusted internal registry proxy if organizational mirroring is required.
  • Restrict package-manager configuration so unapproved registries cannot be selected silently.
  • Run dependency vulnerability, provenance, and license checks in the release pipeline.
  • Disable unnecessary package lifecycle scripts in hardened build environments where operationally feasible.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (22)

Known Vulnerable Dependency: basic-ftp==5.3.0 — 1 advisory(ies): CVE-2026-44240 (basic-ftp allows a malicious FTP server to cause client-side denial of service v)

High
Category
Supply Chain
Confidence
95% confidence
Finding

The lockfile pins basic-ftp to version 5.3.0, and the supplied advisory indicates this version is affected by CVE-2026-44240, where a malicious FTP server can trigger client-side denial of service. Because this skill is an FTP client, it is likely to connect to external or untrusted servers, which makes a server-triggered DoS directly relevant to the skill’s runtime behavior.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: basic-ftp==5.3.0 — 1 advisory(ies): CVE-2026-44240 (basic-ftp allows a malicious FTP server to cause client-side denial of service v)

High
Category
Supply Chain
Confidence
97% confidence
Finding

The skill depends on basic-ftp 5.3.0, which is flagged with a known advisory allowing a malicious FTP server to trigger client-side denial of service. Because this skill is an FTP client, it will process responses from potentially untrusted remote FTP servers, making the vulnerable dependency especially relevant and increasing the likelihood of exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script performs irreversible remote deletion of a file or directory immediately, with no confirmation prompt, dry-run mode, or safety checks. In context, this is more dangerous because the same script can silently obtain credentials and then delete arbitrary remote paths, increasing the chance of accidental or unauthorized destructive actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script automatically loads stored credentials and uses them without notifying the user, which obscures a sensitive action that affects both local secret access and remote account usage. Hidden credential use is especially problematic in an agent or skill context because operators may not realize the script can authenticate to external infrastructure on their behalf.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script spawns an external CLI to fetch stored FTP credentials, which expands its capability beyond simple FTP deletion and creates a hidden trust boundary. Any use of locally available secret stores without explicit user consent or validation can expose sensitive credentials and makes the script riskier in automated environments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Executing a secret-store subprocess without disclosure hides both the fact of subprocess execution and the access to sensitive credential material. In a security-sensitive environment, this undermines operator awareness and can bypass expectations about what a simple deletion helper should be allowed to do.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

Reading credentials from a local creds.json file gives the script access to sensitive material without requiring the user to provide it at runtime. This is dangerous because a deletion utility can silently combine credential harvesting with destructive remote actions, especially when run in shared or CI environments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill silently accesses stored credentials from either a secret store or a local creds.json file without any disclosure, consent, or auditability. In an agent skill context, hidden credential harvesting is more dangerous because users may not expect the skill to read sensitive local or platform-managed secrets automatically.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The code invokes an external CLI to retrieve stored FTP credentials, creating a trust boundary crossing to an unmanaged subprocess. This can expose secrets to a compromised local environment, unexpected PATH resolution, or opaque side effects, especially because the command is executed automatically without validation or user awareness.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The code recursively writes FTP-controlled content to the local filesystem, including creating directories, based entirely on remote server listings and user-supplied destination paths. In this context, that can lead to unexpected bulk writes, disk exhaustion, or overwrite of sensitive local files if the destination is broad or the remote tree is maliciously structured.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This code invokes a subprocess to fetch stored FTP credentials from a secret store and falls back to loading local credentials from a file, but it provides no user-facing notice that sensitive credentials will be accessed automatically. Aside from an error message on failure, there is no confirmation, informational log, or inline disclosure explaining this sensitive operation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The code retrieves stored FTP credentials from a secret store via shell execution and then falls back to a local creds.json file, but there is no prior user-facing warning, confirmation, or explanatory comment about accessing sensitive credentials. Although the error path logs a failure, the successful credential access path is silent, which can surprise users in a code file handling secrets.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script connects with secure: false, which means it uses plaintext FTP rather than FTPS. This exposes usernames, passwords, and file operation metadata to interception or manipulation by anyone with network visibility, and also performs a remote rename action over an unauthenticated channel relative to transport security.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script automatically retrieves FTP credentials by invoking an external secret-store command and silently falls back to a local creds.json file. In a skill context, this creates unexpected access to sensitive secrets and expands trust to subprocess execution, which can expose credentials or enable misuse without clear user consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code accesses stored FTP credentials from a secret store or local file without any user-facing disclosure or consent prompt. In an agent skill, silent credential harvesting is dangerous because users may invoke the skill for file transfer without realizing it will read previously stored secrets automatically.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The subprocess call to openclaw secrets get ftp-client-zc/cred performs sensitive secret retrieval through command execution with no user disclosure. This is risky because it hides privileged behavior inside a helper function and introduces an additional attack surface through external command invocation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script uploads arbitrary local files or directories to a remote server without any prior warning, confirmation, or preview of what will be transmitted. This is especially dangerous in a skill setting because users may unintentionally exfiltrate sensitive local data, and the transfer is done over plain FTP (secure: false), increasing interception risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The markdown includes a creator attribution written in Chinese characters, which can be interpreted as a locale-specific presentation choice. Because the policy asks to flag language or locale constraints that are imposed without opt-in, this is a minor natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The host value is written in Chinese (你自己的ip), which imposes a specific language in a configuration artifact without any indication that the user can choose their preferred language. This can violate language/locale policy when the skill does not document or offer localization choice.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 12)May include surrounding context.

json
"author": "张小龙",
  "license": "MIT",
  "dependencies": {
    "basic-ftp": "^5.3.0",
    "minimist": "^1.2.8"
  }
}

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 13)May include surrounding context.

json
"license": "MIT",
  "dependencies": {
    "basic-ftp": "^5.3.0",
    "minimist": "^1.2.8"
  }
}

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

The inline comment says 'Fallback to local creds.json', but the surrounding credential-loading routine is not merely local-file fallback logic: it first attempts to execute an external command to retrieve secrets from OpenClaw. This documentation framing understates and partially contradicts the function's actual behavior by implying a simpler local-credential path than what the code implements.

Content

No source excerpt is available for this finding.