Digint btrbk
btrbk: SSH Command Filter Bypass in ssh_filter_btrbk.sh
btrbk is a tool for creating snapshots and remote backups of Btrfs subvolumes. From 0.29.0 until 0.32.7, btrbk's ssh_filter_btrbk.sh constructs allow_stream_match with a start anchor but without an end-of-string anchor for the complete command. A user restricted through an authorized_keys forced command can append a trailing pipe command after a valid btrbk command prefix, bypassing the allowlist and executing arbitrary commands with the privileges of the backup-target SSH account. Deployments that do not use ssh_filter_btrbk.sh in authorized_keys are not affected. This issue is fixed in version 0.32.7.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 0.29.0, < 0.32.7
Fixed in 0.32.7
Mitigation
Upgrade btrbk to 0.32.7 or later.
References
- Vendor advisory github.com/digint/btrbk/security/advisories/GH…
- Patch github.com/digint/btrbk/commit/29ca3c093205395…
- Release notes github.com/digint/btrbk/releases/tag/v0.32.7
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.