Skip to content

Authenticated arbitrary file write via backup restore symlink planting

Moderate
nicotsx published GHSA-wcrf-g9p9-2wg7 Jun 14, 2026

Package

runtipi

Affected versions

<=4.10.0

Patched versions

4.10.1

Description

Summary

Runtipi 4.10.0 allows an authenticated user to upload and restore a crafted backup archive that plants a symlink outside the intended restore boundary. A later normal application write follows that planted symlink and writes attacker-controlled content outside the intended user-config directory.

In my reproduction, I restored a backup containing:

- user-config/app.env -> /data/state/proof.txt
After restore, a normal authenticated request to:
- PUT /api/user-config/demoapp3:_user
caused Runtipi to write attacker-controlled content into:
- /data/state/proof.txt

This provides an authenticated arbitrary file write primitive outside the intended restore and user-config directory boundary.

Root cause

The restore flow accepts archive symlinks from an attacker-controlled backup and copies them into live application paths. Later, FilesystemService.writeTextFile() resolves the requested path lexically but does not reject symlink traversal, so a normal write to user-config/app.env follows the planted symlink target.

PoC

  1. Authenticate to Runtipi.
  2. Create or use a custom app, for example demoapp3:_user.
  3. Prepare a .tar.gz backup containing:
    • empty app-data/
    • empty app/
    • empty user-config/
    • symlink member: user-config/app.env -> /data/state/proof.txt
  4. Upload the archive via POST /api/backups/demoapp3:_user/upload
  5. Trigger restore via POST /api/backups/demoapp3:_user/restore
  6. Send a normal authenticated PUT /api/user-config/demoapp3:_user with attacker-controlled appEnv content
  7. Observe that the content is written to /data/state/proof.txt

Observed result

In my reproduction:

  • backup upload succeeded
  • restore succeeded
  • PUT /api/user-config/demoapp3:_user returned HTTP 200
  • /data/state/proof.txt was created
  • its content matched the attacker-controlled appEnv value:
    PWNED_FROM_USERCFG_WRITE

Impact

An authenticated user who can reach the backup restore flow can write attacker-controlled content to arbitrary reachable paths under Runtipi process permissions, provided the target path is usable through a planted symlink in a restored live directory.

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H

CVE ID

CVE-2026-55168

Weaknesses

Improper Link Resolution Before File Access ('Link Following')

The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource. Learn more on MITRE.

UNIX Symbolic Link (Symlink) Following

The product, when opening a file or directory, does not sufficiently account for when the file is a symbolic link that resolves to a target outside of the intended control sphere. This could allow an attacker to cause the product to operate on unauthorized files. Learn more on MITRE.

Credits