/

CVE-2026-37281

Severity:

CRITICAL RISK

(9.8)

OS Command Injection in Zenshin /stream-to-vlc Express Route

CVE-2026-37281

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

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

A command injection flaw in the /stream-to-vlc Express route of Zenshin before version 2.7.0 allows untrusted user input from the url parameter to be incorporated into operating system commands.

Remote attackers can leverage this to execute arbitrary commands on the underlying server when the vulnerable route is exposed over the network.

Affected context

This vulnerability appears in Zenshin deployments that:

  • Run a Node.js/Express server exposing the /stream-to-vlc endpoint
  • Use the url query parameter to build or pass arguments to system-level tools (e.g., VLC or shell commands)
  • Do not robustly validate, sanitize, or safely parameterize the url parameter before invoking OS commands

The risk is highest when the route is reachable from untrusted networks such as the public internet.

Exploit preconditions

  • Attack surface: HTTP interface, specifically the /stream-to-vlc Express route
  • Required access: Ability to send HTTP requests to the vulnerable endpoint (no special privileges implied)
  • Trigger point: Supplying crafted values via the url parameter in a request to /stream-to-vlc
  • Why exploitation is possible: The handler appears to concatenate or embed the url parameter directly into a shell or process execution call without proper escaping or use of a safe API, enabling injection of additional OS commands or arguments.

Why this happens

The underlying issue maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command.

In the /stream-to-vlc Express route, user-controlled data from the url parameter is likely passed into a command execution function (such as child_process.exec or similar) as part of a shell command string.

Because this data is not strictly validated, normalized, or passed as separate, safely-escaped arguments, shell metacharacters and additional commands can be interpreted by the OS, turning simple input into executable instructions.

Potential impact

  • Execution of arbitrary commands on the server hosting Zenshin
  • Unauthorized access to local files and sensitive data
  • Installation of malware, backdoors, or cryptominers
  • Use of the compromised server as a pivot point for lateral movement
  • Service disruption or denial of service by terminating processes or exhausting resources

General mitigation guidance

Effective mitigation focuses on removing the ability for user input to influence shell parsing and on hardening the execution environment:

  • Prefer safe process execution APIs that avoid invoking a shell, and pass user input as strictly-typed arguments rather than interpolated strings.
  • Apply strict allowlists for acceptable url values, including protocol, host, and path constraints, and reject any input that does not match expected patterns.
  • Normalize and validate input thoroughly, stripping or rejecting shell metacharacters and unexpected characters instead of attempting ad-hoc sanitization.
  • Apply the principle of least privilege to the process executing external commands, reducing file system, network, and system-level permissions.
  • Isolate the component that interacts with external tools (e.g., VLC) inside a constrained environment such as a container, jail, or sandbox.

How teams detect issues like this

Detection typically combines code-centric and operational approaches:

  • Use static analysis or linting rules to flag any use of shell-based execution functions (e.g., exec, execSync) that combine string concatenation with request parameters like req.query.url.
  • During code review, look for routes that pass user-controlled data into command-line utilities, particularly where template literals or string concatenation are used to build commands.
  • Enforce secure coding policies that require parameterized process execution and prohibit shell invocation with untrusted input.
  • Monitor runtime logs and telemetry for unusual command patterns originating from the Zenshin process (e.g., unexpected shells, package managers, or network tools being invoked).

Sources

SourceLink
gist.github.comgist.github.com/MitruStefan/cf016709252aabbec7f95b7a70e0cfba
github.comgithub.com/hitarth-gg/zenshin
github.comgithub.com/hitarth-gg/zenshin/commit/7d31c6edfbac978f0ad44c66d761bab9dcd2fa27

Frequently asked

questions

Yes. As long as the /stream-to-vlc route is reachable over the network, a remote attacker can send crafted HTTP requests to attempt command injection via the url parameter.

The description does not indicate an authentication requirement. If the route is unauthenticated, any network user who can access it may attempt exploitation; if fronted by authentication or access controls, those controls become the primary barrier.

The most robust fix is to avoid shell invocation entirely for user-influenced operations, using APIs that accept arguments as arrays and never interpret input as part of a shell command. Additionally, tightly constrain acceptable input with allowlists and strong validation.

Establish coding standards that forbid passing untrusted data into shell commands, mandate safe process execution patterns, and require security review for any code that interacts with the OS. Integrate static analysis and peer reviews into the development pipeline to catch injection patterns early.

Find out what's already
exploitable in your codebase.