Back to skill

Security audit

OpenClaw Migrator

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real OpenClaw migration tool, but it can overwrite persistent agent state and its archive/password handling is not safely scoped enough for automatic approval.

Review before installing. Only use this with archives you created and trust, avoid command-line passwords, restore into a clean or temporary directory first, and keep backups of existing OpenClaw state. The tool is not evidence of malware, but its restore behavior and secret-handling choices are risky for sensitive agent migrations.

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

T09 · Insecure Skill Coding Practices

Warning
Location
src/restore.js:81
Finding

Archive Contents Are Extracted Before AES-GCM Authentication Completes

Content
View full analysis
{ try { decipher.setAuthTag(tag); } catch (e) { reject(new Error('Invalid auth tag')); } }); const extractor = tar.x({ cwd: targetDir, onentry: (entry) => { console.log(`Extracting: ${entry.path}`); } }); decipher.on('error', () => reject(new Error('Decryption failed (Wrong password or corrupted archive)'))); extractor.on('error', reject); extractor.on('end', () => { console.log('🔓 Decryption & Extraction complete.'); resolve(); }); input.pipe(splitter).pipe(decipher).pipe(extractor); ``` ### Technical Analysis AES-GCM provides authenticity only after the complete ciphertext has been processed and the authentication tag has been verified. However, the implementation streams plaintext emitted by `decipher` directly into `tar.x()`. The TAR extractor can therefore create or overwrite files in `targetDir` before AES-GCM authentication finishes. If the supplied archive is corrupted, truncated, encrypted under a different password, or deliberately modified, the decipher may emit unauthenticated plaintext before eventually reporting an authentication failure. Rejecting the Promise does not roll back filesystem changes already made by the extractor. Consequently, an unsuccessful import can still leave the destination in a partially modified state. ### Attack Path 1. An attacker obtains or produces a modified `.oca` archive and supplies it to the victim as a migration backup. 2. The victim invokes `migrator import` with the archive. 3. The program begins decrypting the ciphertext and immediately streams produced plaintext to the TAR extractor. 4. The extractor creates or overwrites files under the selected destination before the final GCM tag is validated. 5. Final authentication fails and ...[truncated 972 chars]
Remediation
View remediation
secure temporary encrypted/decrypted storage -> complete AES-GCM tag verification -> temporary extraction directory -> archive structure validation -> atomic installation into destination ``` ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
src/index.js:10
Finding

Encryption Passwords Are Accepted and Documented as Command-Line Arguments

Content
View full analysis
', 'Output archive path', 'agent-backup.oca') .option('-p, --password ', 'Encryption password') .option('--source ', 'Source directories', [ path.join(process.env.HOME, '.openclaw'), path.join(process.env.HOME, 'clawd') ]) ``` The import command exposes the same option: ```js program.command('import') .description('Restore agent state from an archive') .requiredOption('-i, --input ', 'Input archive path') .option('-p, --password ', 'Decryption password') .option('-d, --dest ', 'Destination directory (defaults to HOME)', process.env.HOME) ``` The documented usage explicitly encourages placing the secret on the command line: ```bash migrator export --out my-agent.oca --password "secret" migrator import --in my-agent.oca --password "secret" ``` ### Technical Analysis Command-line arguments are not an appropriate secret-input mechanism. Depending on the operating system and surrounding tooling, process arguments can be exposed through process inspection interfaces, monitoring agents, audit logs, terminal recording, diagnostic reports, or command telemetr ...[truncated 1871 chars]
Remediation
View remediation
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose is secure migration of real agent state, but the detected behavior reportedly does not perform actual migration and instead writes synthetic fixtures with hardcoded mock credentials and paths. In a security-sensitive migration context, this mismatch is dangerous because operators may trust the skill to safely handle real secrets and state while it behaves unexpectedly, potentially overwriting data, leaking assumptions into production workflows, or masking incomplete or deceptive functionality.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The README instructs users to export and import agent configuration, memory, and skills, which are likely to contain sensitive data such as secrets, personal information, API keys, or untrusted code, but it does not warn about those risks. It also omits cautions about restoring over an existing environment, which could overwrite trusted state or import malicious skills from a transferred archive, making unsafe use more likely.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill declares no explicit tool scope or permissions while static analysis detected environment access capability. For a migration skill that handles sensitive files like configuration and auth tokens, undeclared env access expands the trust boundary and can expose secrets or enable behavior not visible from the manifest, making review and least-privilege enforcement difficult.

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 22)May include surrounding context.

json
"author": "Lucas <lucas.xuan>",
  "license": "MIT",
  "dependencies": {
    "archiver": "^7.0.0",
    "tar": "^7.4.3",
    "fs-extra": "^11.2.0",
    "commander": "^12.0.0"

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
84% confidence
Finding

The tar dependency is specified with a caret range, and the finding notes many known advisories affecting tar across versions. In a migration/backup skill, archive extraction and creation are core functions, so leaving the installed tar version floating makes it plausible that vulnerable releases could be installed, enabling archive-based attacks such as path traversal, overwrite, or denial of service.

Content

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

json
"license": "MIT",
  "dependencies": {
    "archiver": "^7.0.0",
    "tar": "^7.4.3",
    "fs-extra": "^11.2.0",
    "commander": "^12.0.0"
  }

Unverifiable Dependency: tar has 16 known advisory(ies) (CVE-2026-59873 (node-tar: Decompression/parse DoS via unlimited input); CVE-2025-64118 (node-tar has a race condition leading to uninitialized memory exposure); CVE-2026-24842 (node-tar Vulnerable to Arbitrary File Creation/Overwrite via Hardlink Path Trave) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
92% confidence
Finding

This manifest includes tar without pinning to a verifiably safe version, while the analyzer reports numerous advisories against that package. Because this skill's stated purpose is migration of config, memory, and skills between machines, archive handling is likely security-sensitive, so an affected tar release could expose users to malicious archives that cause file overwrite, traversal, memory exposure, or denial of service.

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 24)May include surrounding context.

json
"dependencies": {
    "archiver": "^7.0.0",
    "tar": "^7.4.3",
    "fs-extra": "^11.2.0",
    "commander": "^12.0.0"
  }
}

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 25)May include surrounding context.

json
"archiver": "^7.0.0",
    "tar": "^7.4.3",
    "fs-extra": "^11.2.0",
    "commander": "^12.0.0"
  }
}

Static analysis

No suspicious patterns detected.