/

CVE-2026-45564

Severity:

HIGH RISK

(8.8)

OS Command Injection (CWE-78) in Roxy-WI Config Save Path

CVE-2026-45564

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution by Authenticated User

Severity:

HIGH RISK

(8.8)

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

Roxy-WI contains an OS command injection flaw in how it builds shell commands for handling configuration version files.

Authenticated low-privilege users can manipulate a URL path parameter so that it reaches an os.system() call, potentially executing arbitrary commands on the server.

Affected context

This vulnerability occurs in Roxy-WI deployments that expose the web interface to authenticated users with role level 3 or lower ("user").

It specifically affects the POST endpoint /config/versions/<service>/<server_ip>/<configver>/save, where the configver segment is interpolated into a shell command that normalizes config files.

The issue is present when the application relies on Pydantic validation for path parameters but still passes those parameters directly into an os.system() call without proper escaping, quoting, or avoiding the shell.

Exploit preconditions

  • Attack surface: HTTP POST request to /config/versions/<service>/<server_ip>/<configver>/save
  • Required access: Valid Roxy-WI account with role <= 3 ("user"); no elevated administrative privileges are required
  • Trigger point: Submission of a crafted configver path segment that is concatenated into the dos2unix command
  • Why exploitation is possible: The configver parameter is treated as a plain string, not passed through EscapedString, and is directly used to build a shell command via os.system(f"dos2unix -q {cfg}"), allowing shell metacharacters to alter command execution

Why this happens

The root cause is unsafe construction of shell commands using untrusted input within application logic.

Roxy-WI builds a command string containing a file path derived from the configver URL segment and passes it to os.system, which invokes /bin/sh -c under the hood.

Because the path segment is not sanitized, escaped, or constrained to a safe subset, attackers can inject shell syntax that the shell interpreter treats as additional commands.

This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, where user-controllable data is incorporated into OS commands without proper neutralization, instead of using parameterized or API-based execution.

Potential impact

  • Execution of arbitrary OS commands with the privileges of the Roxy-WI process
  • Reading, modifying, or deleting configuration files for managed services (HAProxy, Nginx, Apache, Keepalived)
  • Lateral movement by dropping backdoors or modifying reverse proxy rules
  • Service disruption or denial of service by corrupting configs or terminating processes
  • Potential escalation within the host environment if the Roxy-WI process runs with elevated permissions

General mitigation guidance

Mitigation centers on eliminating direct shell invocation with untrusted input and enforcing strict constraints on configuration paths.

Common defensive patterns include:

  • Replacing os.system (or equivalent shell wrappers) with APIs that do not invoke a shell, such as subprocess.run([...], shell=False) or language-native file transformation utilities
  • Treating URL path segments as opaque identifiers, validating them against an allowlist of known configuration versions rather than interpolating them into commands
  • Applying robust input validation and normalization for path-related values, ensuring only expected characters and directory structures are permitted
  • Running Roxy-WI under a dedicated, minimally privileged account so that even if commands are abused, the blast radius is reduced
  • Isolating the management interface on restricted networks or VPN-only access to limit who can reach authenticated entry points

How teams detect issues like this

Detection efforts can focus on both code-level and runtime indicators:

  • Static analysis rules that flag uses of os.system, subprocess with shell=True, or similar APIs when passed user-derived data (e.g., URL path parameters, form fields)
  • Code review practices that highlight any string concatenation or f-strings used to construct shell commands, especially in request-handling routes
  • Security linters or automated review tools configured to enforce policies against shell invocation in web handlers or to require documented justification
  • Runtime monitoring of command execution (e.g., audit logs, EDR) for unusual invocations of dos2unix, shell interpreters, or unexpected arguments originating from web processes
  • Web server and application logs correlation to spot suspicious configver path segments containing shell metacharacters or atypical patterns

Sources

SourceLink
github.comgithub.com/roxy-wi/roxy-wi/security/advisories/GHSA-w42x-3v8j-cmg2

Frequently asked

questions

Yes, any attacker who can reach the Roxy-WI web interface and authenticate with a low-privilege "user" role can send crafted HTTP POST requests to the vulnerable endpoint.

The attacker needs valid credentials with role level 3 or lower; no administrative rights are required, but anonymous users cannot exploit it directly.

The most robust fix is to avoid shell-based command construction entirely by using non-shell APIs for file conversion or processing and by treating configver as an identifier that is resolved to a trusted path rather than concatenated into a command string.

Establish a secure coding standard that forbids passing user-controlled data into shell commands, mandates strong validation for all path parameters, and uses automated tooling and code reviews to detect injection patterns in route handlers and configuration-management features.

Find out what's already
exploitable in your codebase.