T05 · Unauthorized Access and Privilege Escalation
- Location
smart-backup.js:355- Finding
Restore Path Traversal Through Untrusted Manifest Entries
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a local backup tool, but it has unsafe path handling and misleading behavior that can read, write, or restore files outside the locations a user intended.
Install only with review. Use this skill on non-sensitive test directories first, avoid restoring backups from untrusted sources, avoid --force and --delete unless you have inspected the paths, and do not rely on the advertised compression, destination selection, symlink safety, or full SHA-256 integrity claims until the implementation is fixed.
smart-backup.js:355Restore Path Traversal Through Untrusted Manifest Entries
smart-backup.js:308Backup Verification Can Read Files Outside the Backup Directory
smart-backup.js:66Backup and Sync Operations Follow Symbolic Links Outside Intended Roots
smart-backup.js:23User-Supplied Backup Destination and Directory Override Are Ignored
smart-backup.js:472Incorrect Positional Argument Parsing Causes Unintended Filesystem Scope
smart-backup.js:57SHA-256 Integrity Digests Are Truncated to 64 Bits
The documentation materially misstates behavior: it advertises compression that is not implemented, suggests user-specified destinations that may actually be ignored, and underdeclares persistent state plus destructive delete/overwrite modes. In backup/restore tooling, this mismatch is dangerous because users and agents may make safety decisions based on false assumptions, leading to data loss, privacy exposure, or writes outside intended locations.
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
let incremental = false;
let fromManifest = null;
let deleteFlag = false; // --delete: enable file deletion during sync
let forceFlag = false; // --force: overwrite existing files (restore) or proceed with deletion (sync)
for (let i = 0; i < args.length; i++) {
if (args[i] === '--backup') mode = 'backup';
The markdown lists commands for backup, sync, and restore that act on user files and directories, but it does not warn that these operations can write data to destinations and potentially overwrite existing contents. For markdown files, safety-relevant behavior affecting user data should be disclosed so users understand the risk before invoking the skill.
The skill declares no explicit tool scope or permissions while the analyzer detected environment-related capabilities. In an agent setting, missing scope declarations can cause the skill to be invoked with broader-than-expected authority, reducing operator visibility into what resources it may access.
The manifest description and module header describe 'compression' as part of the skill, but the implemented backup paths simply copy files with fs.copyFileSync and even note 'in production, would compress'. This is a direct mismatch between the advertised behavior and the actual code behavior.
The description lists very general capabilities like 'Backup, sync, verify integrity, dedup, and restore' without narrowing when this skill should be selected versus ordinary conversational mentions of backing up or restoring files. In a manifest-context file, this lack of trigger specificity can cause unintended invocation overlap with common file-management requests.
The section encourages adding the skill to heartbeat/maintenance workflows with recurring actions, but it does not clearly define when the skill should or should not run, or what safeguards determine applicability. For manifest/markdown guidance, this can make invocation scope too broad in automated maintenance contexts.
The comment explicitly frames the following block as a placeholder for compression, but the code beneath it performs uncompressed file copies only. Because the skill documentation presents compression as a current capability, this comment highlights an intent-code divergence rather than a mere omitted detail.