Zerobyte: Command Execution as Root via the rclone Remote
An authenticated user creates a repository with an rclone connection string as remote; its ssh option names a program that rclone starts as root inside the container.
Advisory ID: TP-2026-143
Product: Zerobyte (self-hosted backup management built on restic)
Vulnerability type: Command execution through argument injection (CWE-88)
CVE: requested (GitHub CNA), assignment pending
CVSS 3.1: 7.2 (High) · CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Vendor advisory: GHSA-vf6g-phcj-796x
Affected versions: up to and including 0.43.2 (verified live: commit b3d6cc27)
Fixed in: 0.44.0
Reported: 29 October 2026
Summary
Zerobyte is a self-hosted backup management application built on restic; repositories can be attached through the rclone backend, among others. The remote field of that backend is an unvalidated string and is placed raw into the repository specification that restic receives as the value of --repo. An rclone specification with a leading colon is a connection string whose ssh option names the program rclone starts for the SFTP transport. Zerobyte forbids --repo and --option in custom restic parameters but does not check the same value in the repository form. An authenticated account, in the test an invited member with no special role, runs an arbitrary program as root inside the Zerobyte container by creating a repository.
Root cause
Line numbers refer to commit b3d6cc27. rcloneRepositoryConfigSchema declares remote as z.string().min(1) (packages/core/src/restic/schemas.ts:92) and does not match the value against the configured remotes.
buildRepoUrl interpolates it unchanged into rclone:${config.remote}:${config.path} (packages/core/src/restic/helpers/build-repo-url.ts:23), and fifteen restic commands place the result in the argv as the value of --repo, for example packages/core/src/restic/commands/stats.ts:25 and packages/core/src/restic/commands/restore.ts:60.
validateCustomResticParams rejects --repo, -r, --option and -o through DENIED_FLAGS (packages/core/src/restic/helpers/validate-custom-params.ts:1-15, packages/core/src/restic/helpers/validate-custom-params.ts:104), and the repository configuration does not pass through that check.
The writing route POST /api/v1/repositories carries only .use(requireAuth) and no permission check (app/server/modules/repositories/repositories.controller.ts:62, app/server/modules/repositories/repositories.controller.ts:68).
The same unvalidated value reaches the argv of rclone mount (app/server/modules/volumes/volume-host/backends/rclone.ts:84).
Proof of Concept
POST /api/v1/repositories HTTP/1.1
Content-Type: application/json
{"config":{"backend":"rclone","remote":":sftp,host=h,user=u,ssh=/bin/sh -c mkdir$IFS-p$IFS/tmp/poc-uid-$(id$IFS-u)-$(hostname)","path":"/"}}
HTTP/1.1 500
GET /api/v1/volumes/filesystem/browse?path=tmp HTTP/1.1
HTTP/1.1 200
... "poc-uid-0-7006c1436330" ...
The leading : turns remote into an rclone connection string, and rclone starts the program named under ssh before repository creation fails with HTTP 500. Verified on commit b3d6cc27 in Docker with the default configuration as an invited member ("role":"member") of a foreign organization: the directory name with uid-0 and the container hostname proves execution as root, read back through the application's own API. An ordinary remote name executes nothing, as the control.
Impact
- Arbitrary program execution as root in the Zerobyte container with a single API request; the image declares no
USER. - Reachable in the test by an invited organization member with no special role, while the comparable route
POST /api/v1/repositories/:shortId/execrequiresrequireDevPanelandrequireOrgAdmin. - Access to the repositories, restic passwords and backup data of every organization on the instance.
- Host volumes mounted into the container are readable and writable by the executed program.
References
Is Something Like This in Your Software?
Our team found this vulnerability during its work. Have your applications tested by the same specialists, with a penetration test from turingpoint.
