T09 · Insecure Skill Coding Practices
- Location
scripts/shared/utils.js:108- Finding
Shell Command Injection Through the Message Recipient
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This identity skill mostly matches its stated purpose, but it stores private keys in plaintext and has an unsafe message-sending helper that can execute unintended shell commands.
Review before installing. Do not use this skill with valuable or reusable private keys unless the key storage is hardened. Treat --to and challenge inputs as untrusted; the message-sending command should be fixed to avoid shell interpolation before use. Run it only in an isolated account or environment and update the vulnerable dependency tree.
scripts/shared/utils.js:108Shell Command Injection Through the Message Recipient
scripts/shared/storage/base.js:25Private Keys Persisted in Plaintext Without Enforced File Permissions
scripts/verifySignature.js:17Signature Verification Challenges Can Be Replayed Indefinitely
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
Before using this skill for the first time, you must execute:
cd scripts && npm install
node createNewEthereumIdentity.js
node linkHumanToAgent.js --to <sender> --challenge <challenge_value>
Lets AI agents create and manage their own identities on the Billions Network, and link those identities to a human owner.
All identity data is stored in $HOME/.openclaw/billions for compatibility with the OpenClaw plugin.
The skill explicitly documents storage of sensitive identity artifacts, including unencrypted private keys in kms.json and verifiable credentials in local files. In the context of an agent skill with filesystem and network-adjacent behavior, this creates a real credential exposure risk if the directory is accessed by other tools, users, logs, backups, or compromised processes.
- `kms.json` - **CRITICAL**: Contains unencrypted private keys
- `defaultDid.json` - DID identifiers and public keys
- `challenges.json` - Authentication challenges history
- `credentials.json` - Verifiable credentials
- `identities.json` - Identity metadata
- `profiles.json` - Profile data
ws 8.18.0 is present and is flagged for memory disclosure and memory-exhaustion denial of service issues. In an agent identity/authentication skill that may maintain websocket-based RPC or verifier connections, a vulnerable ws version can expose process memory or allow remote service disruption via crafted frames.
brace-expansion 2.0.2 is present and has multiple reported DoS issues involving pathological expansion patterns that can consume excessive CPU or memory. While often build- or tooling-adjacent, any runtime path that accepts attacker-influenced glob-like patterns could be abused to hang the process.
fast-uri 3.1.0 is reported vulnerable to multiple URI parsing and canonicalization flaws, including host confusion and SSRF-relevant edge cases. In an identity/authentication skill that may resolve remote resources, DIDs, schemas, or verifier endpoints, malformed URI handling can meaningfully expand attack surface and make this dependency more dangerous than in a purely local tool.
ws 7.5.10 is flagged for memory-exhaustion DoS and appears in an older transitive chain. If any websocket listener/client path processes attacker-controlled fragmented messages, an attacker may be able to degrade or crash the service.
jsonpath 1.2.1 is reported vulnerable to arbitrary code injection via unsafe evaluation of JSONPath expressions. Even as a transitive dependency, this is high risk if any code path evaluates attacker-controlled JSONPath input, because it can potentially lead to code execution inside the agent process.
minimatch 5.1.6 has several ReDoS issues caused by crafted glob patterns leading to catastrophic backtracking or combinatorial work. If any user-supplied patterns reach this library, an attacker can cause CPU exhaustion and deny service.
underscore 1.13.6 is reported to allow unlimited recursion in flatten/equality helpers, enabling denial of service with deeply recursive inputs. In agent ecosystems that may process arbitrary credential or RPC JSON, this can be abused to crash or stall the process if such helpers are invoked on attacker-controlled data.
undici 5.29.0 is reported vulnerable to multiple serious HTTP parsing and request-handling flaws, including request/response smuggling, queue poisoning, and CRLF injection scenarios. Because this skill revolves around remote identity and proof interactions, outbound HTTP is likely central, making a vulnerable HTTP client especially concerning for SSRF, cache poisoning, or cross-request contamination risks.
ws 8.17.1 is another vulnerable websocket implementation instance affected by memory disclosure and fragmentation-based memory exhaustion. Multiple vulnerable websocket versions in one lockfile increase the chance that at least one network-facing path remains exploitable.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
function newDataStorage(ethStateStorage) {
return {
credential: new CredentialStorage(
new IdentitiesFileStorage("credentials.json"),
),
identity: new IdentityStorage(
new IdentitiesFileStorage("identities.json"),
The utility module exposes a direct messaging helper that spawns a shell command with unsanitized target and message values interpolated into the command string. This creates a command injection risk and also introduces an unrelated outbound messaging capability in a shared utility file, which is especially dangerous in an agent skill because attacker-controlled inputs could trigger arbitrary command execution or covert message sending.
The skill exposes capabilities that imply environment access and network communication, but it declares no explicit tool scope or permissions boundary. In an agent setting, this makes identity creation, message sending, and access to sensitive local state less auditable and easier to invoke unintentionally or with excessive privilege.
The setup flow instructs immediate execution of scripts that create persistent identity material and then perform a linking action, without upfront consent language or a warning that unencrypted private keys will be stored locally and linkage data may be transmitted to another party. This can cause operators or agents to create sensitive credentials and disclose identity associations before understanding the security consequences.
The script sends a direct message to an arbitrary recipient supplied via the --to argument without any confirmation, preview, or user-facing disclosure of the outbound action. In an agent context, this can enable unintended message delivery, phishing-style identity linking prompts, or covert outbound communication if another component invokes the script with attacker-controlled parameters.
This code persists private cryptographic key material directly to a local JSON file as plaintext (privateKeyHex) with no encryption, access-control enforcement, or user warning. If the filesystem is readable by other local users, included in backups, exposed via logs, or accidentally committed, an attacker can recover the private keys and fully impersonate the agent or sign arbitrary data.
The code sends messages via a subprocess without any visible warning, consent, logging, or disclosure, making outbound communication easy to hide from users or reviewers. In an agent identity skill, undisclosed messaging is more suspicious because it is unrelated to core DID/authentication helpers and could be abused for covert data exfiltration or unauthorized actions.
The script sends the generated signed token to the recipient specified by --to via sendDirectMessage, which is a network/message transmission of user-derived data. While argument validation and error output are present, there is no visible confirmation prompt, user-facing notice about the outbound transmission, or explanatory comment/docstring describing this behavior in the file.
The lockfile pins uuid 13.0.0, which is reported vulnerable to a missing bounds check when v3/v5/v6 APIs are called with a caller-provided buffer. Even though this is only a dependency manifest and not proof of reachable exploitation, the package version is present and therefore represents a real supply-chain risk if affected APIs are used anywhere in the skill or its transitive libraries.
uuid 9.0.1 is also present transitively and carries the same bounds-check issue for certain namespace/version APIs when a buffer is provided. This is a genuine dependency risk, though likely lower severity unless the affected API pattern is exercised by the skill or upstream libraries.
ajv 8.17.1 is flagged for ReDoS when the $data option is enabled and attacker-controlled schemas or inputs are processed. In an identity stack that may validate credential or proof payloads, this can become a request-level denial of service if unsafe ajv features are enabled by the application or a library.
elliptic 6.6.1 is flagged for use of a risky cryptographic implementation. In a package dealing with identity, signing, and proofs, dependence on weaker or problematic crypto implementations increases assurance risk even if immediate exploitability is not evident from the lockfile alone.
uuid 8.3.2 is another vulnerable transitive copy affected by the same bounds-check flaw. Multiple vulnerable copies increase maintenance risk and make it more likely at least one reachable code path remains unpatched.
stream-json 1.9.1 is flagged for quadratic behavior on deeply nested input for certain filters. This is a real algorithmic complexity issue, but impact depends on whether the affected filters are used on attacker-controlled JSON payloads.