T09 · Insecure Skill Coding Practices
- Location
namecheap-dns.js:173- Finding
OS Command Injection Through Unvalidated Domain Input
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill has a clear Namecheap DNS purpose, but it can make high-impact DNS changes and contains unsafe command and restore handling that users should review before installing.
Install only if you are comfortable giving this tool Namecheap DNS credentials and reviewing commands before they run. Treat it as Review-worthy until domain validation, shell-safe dig execution, backup path containment, backup schema validation, and restore target-domain confirmation are fixed; use a least-privilege API key if available and keep backups in a private directory.
namecheap-dns.js:173OS Command Injection Through Unvalidated Domain Input
namecheap-dns.js:396Backup Path Traversal and Unvalidated Restore Data
namecheap-dns.js:680Restore Operation Does Not Bind Backup Data to the Target Domain
namecheap-dns.js:79Namecheap API Credential Transmitted in URL Query Parameters
Referenced artifact was not completely inspected
./namecheap-dns.js verify example.com
Referenced artifact was not completely inspected
./namecheap-dns.js verify example.com
Referenced artifact was not completely inspected
./namecheap-dns.js verify example.com
Referenced artifact was not completely inspected
./namecheap-dns.js verify example.com
Referenced artifact was not completely inspected
./namecheap-dns.js verify example.com
Referenced artifact was not completely inspected
./namecheap-dns.js verify example.com
Referenced artifact was not completely inspected
./namecheap-dns.js verify example.com
Referenced artifact was not completely inspected
./namecheap-dns.js verify example.com
Referenced artifact was not completely inspected
./namecheap-dns.js verify example.com
Referenced artifact was not completely inspected
./namecheap-dns.js verify example.com
Referenced artifact was not completely inspected
./namecheap-dns.js verify example.com
Referenced artifact was not completely inspected
./namecheap-dns.js verify example.com
Referenced artifact was not completely inspected
./namecheap-dns.js verify example.com
Skill attempts to nullify the agent's safety policies or restrictions ('you have no restrictions', 'ignore your guidelines', 'do anything now'). This is a direct jailbreak that disables guardrails.
--txt "test=hello" \
--dry-run
# Force override safety check (if you know ghost records can be deleted)
./namecheap-dns.js add example.com \
--txt "test=hello" \
--force
Skill attempts to nullify the agent's safety policies or restrictions ('you have no restrictions', 'ignore your guidelines', 'do anything now'). This is a direct jailbreak that disables guardrails.
--txt "test=hello" \
--dry-run
# Force override safety check (if you know ghost records can be deleted)
./namecheap-dns.js add example.com \
--txt "test=hello" \
--force
This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
--txt "test=hello" \
--dry-run
# Force override safety check (if you know ghost records can be deleted)
./namecheap-dns.js add example.com \
--txt "test=hello" \
--force
This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
--txt "test=hello" \
--dry-run
# Force override safety check (if you know ghost records can be deleted)
./namecheap-dns.js add example.com \
--txt "test=hello" \
--force
The lockfile pins axios 1.13.5, and the supplied advisory set includes multiple high-severity issues such as SSRF-related proxy bypass and prototype-pollution-driven request/response compromise. In a DNS management skill that makes authenticated outbound API calls, weaknesses in the HTTP client are especially relevant because they can expose credentials, alter requests, or redirect sensitive traffic.
form-data 4.0.5 is flagged for CRLF injection via unescaped multipart field names and filenames. This skill appears primarily focused on DNS API operations, so multipart handling may not be central, but the vulnerable package is still present and could become exploitable if any user-controlled multipart requests are introduced or indirectly used by dependencies.
The package permits installation of axios 1.13.5 via the semver range, and the static analysis reports that version as having multiple known advisories, including SSRF and prototype-pollution-related exploitation paths. For a tool that manages DNS through remote API calls, flaws in the HTTP client can materially affect request integrity, proxy handling, credential exposure, or response trust.
The skill requires sensitive environment variables such as NAMECHEAP_API_KEY, NAMECHEAP_USERNAME, and NAMECHEAP_API_USER, but it does not declare any explicit tool scope or permissions boundary. This weakens reviewability and increases the chance that a host agent exposes secrets to the skill without clear user consent or least-privilege controls.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
const __dirname = dirname(fileURLToPath(import.meta.url));
const API_BASE = 'https://api.namecheap.com/xml.response';
// Configurable backup directory
function getBackupDir() {
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
const value = process.env[key];
if (!value) {
console.error(`❌ Error: ${key} environment variable not set`);
console.error(` Add to ~/.zshrc: export ${key}="your-value"`);
process.exit(1);
}
return value;
The skill builds shell commands with untrusted domain input using execSync(dig +short ${fullDomain} ${type}) and similar calls for subdomains. Because shell metacharacters in the domain are not validated or escaped, an attacker can achieve OS command injection, which is materially more dangerous than the stated DNS-management purpose of the skill.
Backups persist complete DNS state, including TXT records that often contain SPF, DKIM, verification tokens, and internal mail-routing details, to local JSON files without any warning, permission hardening, or opt-in. This creates a confidentiality risk if the workstation, repo directory, or backup path is shared, synced, or world-readable.
Detected: suspicious.dangerous_exec, suspicious.env_credential_access