/

CVE-2026-41315

Severity:

CRITICAL RISK

(9.8)

OS Command Injection in mdserver-web Scheduled Task

CVE-2026-41315

Analyzed

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78, CWE-862

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.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

mdserver-web versions 0.18.0 through 0.18.4 contain an unauthenticated remote command execution flaw in the scheduled task management endpoints.

Because the /modify_crond and /start_task interfaces lack proper authentication and allow modification and execution of default built-in cron tasks, an attacker can craft requests that ultimately run arbitrary OS commands on the underlying server.

Affected context

This vulnerability affects deployments of mdserver-web (0.18.0–0.18.4) where:

  • The web panel is exposed over a network (e.g., LAN or Internet).
  • The built-in scheduling functionality uses system-level cron or equivalent command execution.
  • The /modify_crond and /start_task endpoints are reachable without additional network-layer controls such as IP whitelisting, reverse proxies with auth, or VPN access.

In such setups, the panel's task management APIs become a direct execution channel on the host system.

Exploit preconditions

  • Attack surface: HTTP(S) endpoints /modify_crond and /start_task exposed by mdserver-web.
  • Required access: No application-level authentication; network-level access to the panel is sufficient.
  • Trigger point: Sending crafted requests that alter scheduled tasks and trigger them to run.
  • Why exploitation is possible:
  • The endpoints lack authorization checks (CWE-862) and are callable by any remote client.
  • Task modification and execution logic ultimately pass attacker-controlled data into command execution paths without robust validation or escaping (CWE-78).

Why this happens

The core issue is a combination of missing authorization and unsafe command handling in the scheduled task interfaces.

First, the /modify_crond and /start_task endpoints do not enforce authentication or role-based access control, effectively treating all callers as trusted.

Second, user-controlled task definitions or parameters are propagated into system scheduling or shell invocation without constraining them to safe, predefined commands or arguments.

This aligns with CWE-78: Improper Neutralization of Special Elements used in an OS Command, where untrusted input influences command construction, and CWE-862: Missing Authorization, where sensitive operations are exposed without access control.

Potential impact

  • Remote execution of arbitrary system commands under the privileges of the mdserver-web process.
  • Installation of persistent backdoors or additional malware on the host.
  • Exfiltration, modification, or deletion of application and system data.
  • Use of the compromised server as a pivot point for lateral movement within the network.
  • Disruption of services through destructive commands or resource exhaustion.

General mitigation guidance

Mitigation generally focuses on both hardening access control and constraining command execution behavior:

  • Enforce mandatory authentication and authorization on all task management APIs, ensuring only authenticated and appropriately privileged users can modify or start scheduled tasks.
  • Design scheduled task interfaces around fixed, whitelisted commands or job templates rather than accepting free-form command strings.
  • Use parameterized invocations and library APIs instead of constructing shell commands from concatenated input.
  • Apply least-privilege principles so that the process executing tasks runs with minimal OS permissions and cannot affect unrelated parts of the system.
  • Restrict direct exposure of the panel to untrusted networks; prefer access via VPNs, bastion hosts, or additional reverse-proxy authentication layers.

How teams detect issues like this

Detection can be approached through multiple layers:

  • Static analysis: Look for code paths that:
  • Expose HTTP endpoints performing scheduling or command-related actions without authentication or authorization checks.
  • Build shell commands or cron entries directly from request parameters or user-provided strings.
  • Code review: Flag patterns such as:
  • Direct use of shell execution functions (e.g., system, exec, popen, backticks) in HTTP handlers without clear input validation.
  • Absence of middleware or filters enforcing authentication on sensitive routes like task management, backups, or configuration changes.
  • Runtime monitoring:
  • Log and alert on unusual access to /modify_crond, /start_task, or equivalent endpoints, especially from unfamiliar IPs.
  • Correlate web access logs with system logs (cron logs, shell history, process creation events) to spot abnormal task definitions or commands.
  • Policy and tooling:
  • Apply automated security tests or API fuzzing to discover endpoints that perform privileged operations without requiring authentication.
  • Use configuration and compliance checks that verify all management APIs are protected by access control policies.

Sources

SourceLink
github.comgithub.com/midoks/mdserver-web/security/advisories/GHSA-3h92-g9hr-xc25

Frequently asked

questions

Exploitability is broad wherever the mdserver-web panel is reachable over the network; any remote client with network access to the vulnerable instance can attempt to trigger the flaw because the affected endpoints lack authentication.

No application-level credentials are required. The vulnerable endpoints are missing authorization, so the main prerequisite is network access to the panel.

The most robust pattern is to enforce strict authentication and role-based authorization on all administrative and task-management endpoints, and to redesign command execution so that only predefined, whitelisted operations can be invoked, with no free-form shell command construction from user input.

Integrate security-by-design practices: require auth middleware for all privileged routes by default, adopt least-privilege execution for background tasks, avoid direct shell invocation with user-controlled data, and include access control and command-injection checks in code review and automated testing pipelines.

Find out what's already
exploitable in your codebase.