/

CVE-2026-25116

Severity:

HIGH RISK

(7.6)

Path Traversal File Write in Runtipi UserConfigController

CVE-2026-25116

Analyzed

Vulnerability type

Category:

Path Traversal / Arbitrary File Write

CWE:

CWE-22, CWE-306

Impact:

Remote Code Execution via Configuration Takeover

Severity:

HIGH RISK

(7.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

An unauthenticated path traversal issue in Runtipi's UserConfigController allows arbitrary file writes, including overwriting the primary docker-compose.yml configuration.

By abusing insecure URN parsing, a remote attacker can replace the main stack configuration so that on the next restart, malicious containers are launched, leading to remote code execution and potential host filesystem compromise.

Affected context

This vulnerability affects Runtipi personal homeserver deployments that expose the UserConfigController over a network where unauthenticated users can reach it.

The issue is present when:

  • The application accepts URN- or path-like user input to identify configuration files
  • That input is used to resolve filesystem paths without robust normalization and enforcement of allowed directories
  • The resulting path can reach the main docker-compose.yml or other sensitive configuration files used to orchestrate containers

The risk materializes when the operator later restarts or redeploys the stack, causing the compromised configuration to be executed.

Exploit preconditions

  • Attack surface: HTTP/API interface exposed by Runtipi's UserConfigController.
  • Required access: None; the vulnerable endpoint is reachable without authentication.
  • Trigger point: Submission of a crafted URN/path parameter that traverses out of the intended directory and targets docker-compose.yml (or other critical files).
  • Why exploitation is possible: User input intended to reference configuration resources is parsed and mapped to filesystem paths without strong directory confinement, canonicalization checks, or authentication/authorization, enabling an attacker to overwrite protected configuration files.

Why this happens

The root cause is insufficient path validation when resolving URN-like input into filesystem locations, combined with a lack of authentication on a sensitive configuration-management endpoint.

This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, where user-controlled path segments (such as ../) are not normalized and constrained to an allowed base directory.

Additionally, the missing or inadequate authentication on the configuration controller corresponds to CWE-306: Missing Authentication for Critical Function, because the ability to modify core orchestration configuration is exposed to unauthenticated users.

In abstract terms, the system trusts user-provided identifiers to directly influence which files are written, instead of treating them as untrusted input that must be tightly constrained and mediated.

Potential impact

  • Overwriting of docker-compose.yml with attacker-controlled content
  • Remote Code Execution when the operator restarts or redeploys the Runtipi stack
  • Deployment of malicious containers that can exfiltrate data or pivot further into the host
  • Compromise of host filesystem via privileged or bind-mounted containers defined in the attacker's configuration
  • Persistent backdoors embedded into the orchestration configuration

General mitigation guidance

Effective mitigation focuses on strictly constraining how user input maps to filesystem operations and protecting configuration management endpoints:

  • Enforce robust authentication and, where appropriate, authorization checks on any feature that reads, writes, or replaces configuration files.
  • Implement strict path canonicalization and validation: resolve input to an absolute path, verify it remains under a predefined configuration directory, and reject any attempt to escape that boundary.
  • Use allowlists of known configuration file names or IDs instead of accepting arbitrary paths or URNs from clients.
  • Separate user-editable configuration from core orchestration files; keep critical files write-protected by the application and editable only through controlled, privileged workflows.
  • Run the service under least-privilege OS accounts and file permissions so that even if a write operation is misused, the attacker's access to sensitive files is minimized.

How teams detect issues like this

Teams can pursue a mix of static and operational detection strategies:

  • Static analysis and code review: Flag any code paths where user-supplied strings are concatenated into file paths, especially in controllers handling configuration; verify canonicalization and directory constraints are applied consistently.
  • Policy enforcement: Establish coding standards requiring safe file-access wrappers that automatically enforce base-directory checks and disallow relative traversal sequences.
  • Runtime monitoring: Inspect application and web server logs for suspicious configuration operations, such as unexpected writes to docker-compose.yml or other core files, and requests containing traversal patterns in URN or path parameters.
  • File integrity monitoring: Track changes to critical configuration files (e.g., docker-compose.yml) and alert on modifications originating from the application runtime rather than authorized administrative workflows.

Sources

SourceLink
github.comgithub.com/runtipi/runtipi/releases/tag/v4.7.2
github.comgithub.com/runtipi/runtipi/security/advisories/GHSA-mwg8-x997-cqw6

Frequently asked

questions

Yes, if the Runtipi management interface (and specifically the UserConfigController) is exposed to the internet or an untrusted network, a remote attacker can exploit it without prior access.

No. The vulnerable functionality is unauthenticated, so any reachable user can attempt to overwrite configuration files, including docker-compose.yml.

Require authentication for all configuration-modifying endpoints, strictly canonicalize and constrain any user-influenced file paths to a safe directory, and avoid exposing direct file path controls—prefer named resources or IDs that are validated against an allowlist.

Design file-access layers that never accept raw user paths, enforce path normalization and directory whitelisting at a central abstraction, treat configuration management as a privileged capability gated by strong authentication, and include checks for path traversal and unsafe file operations in code review and automated security testing.

Find out what's already
exploitable in your codebase.