T05 · Unauthorized Access and Privilege Escalation
- Location
references/replication.md:220- Finding
Passwordless SSH Replication Credential Grants Broad Destructive Access
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This ZFS administration skill is mostly coherent, but its replication guidance grants broad passwordless SSH access and destructive ZFS permissions that users should review carefully.
Review the replication section before using it in production. Prefer restricted SSH keys, non-interactive accounts, per-replica keys, and only the ZFS permissions actually needed; add explicit checks before any rollback, destroy, forced receive, or automated pruning command.
references/replication.md:220Passwordless SSH Replication Credential Grants Broad Destructive Access
scripts/zfs_health_check.sh:121Unquoted User-Controlled Pool Argument Permits ZFS Option Injection
The manifest description provides many specific examples, but then broadens activation to 'any other ZFS/zpool/zfs administration task.' In a manifest trigger description, this catch-all makes the activation boundary less explicit and increases the chance of unintended invocation for loosely related storage questions.
The skill presents zfs rollback and zfs destroy as straightforward examples without prominently warning that they are destructive and can irreversibly discard newer data or delete snapshots. In an administrative skill, users may copy commands directly, so omission of safety framing materially increases the risk of accidental data loss on production systems.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sysctl kstat.zfs.misc.arcstats.size
sudo sysctl -w kstat.zfs.misc.arcstats.c_max=8589934592
## Key Behavioral Differences
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.
# Linux: ZFS mounts datasets automatically at boot via zfs-mount.service
systemctl enable zfs-mount.service
systemctl enable zfs-import-cache.service
# macOS: ZFS mounts via LaunchDaemon, generally automatic
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.
# Linux: ZFS mounts datasets automatically at boot via zfs-mount.service
systemctl enable zfs-mount.service
systemctl enable zfs-import-cache.service
# macOS: ZFS mounts via LaunchDaemon, generally automatic
The guide includes rollback commands that destroy newer changes and, with -r, can also remove intermediate snapshots, but it does not present a prominent warning immediately around the example. In an administrative ZFS skill, users may copy commands directly, so omission of a clear caution materially increases the risk of accidental irreversible data loss.
The snapshot destruction examples permanently delete snapshots, including a range deletion, without a prominent caution about irreversibility or dependency implications. In backup/replication documentation, deleting the wrong snapshot can also break incremental replication chains in addition to causing data loss.
The example uses zfs recv -F, which can forcibly roll back and overwrite the target dataset to match the incoming stream, yet the example lacks a clear inline warning. Because this is replication guidance for real systems, a user could unintentionally destroy valid destination-side data by copying the command as shown.
The automated pruning script pipes snapshot names into zfs destroy with no embedded safeguards, dry-run mode, or explicit warning, making accidental mass deletion plausible if naming assumptions or dataset scope are wrong. Since the file targets operational automation, users are especially likely to deploy such scripts directly in production.
The guide presents zfs rollback tank/data@last-good-snapshot as a recovery step without an immediate explicit warning that rollback discards all newer changes in that dataset. In a troubleshooting context, operators may copy-paste commands under pressure, so omission of the destructive consequence increases the chance of accidental data loss.
No suspicious patterns detected.