CVE-2026-37281: Verified Repro With Script Download
CVE-2026-37281: zenshin: OS command injection in /stream-to-vlc url query parameter
CVE-2026-37281 is verified against the affected target. Vulnerability class: RCE. This critical reproduction includes runnable sandbox proof, artifacts, and a plain-text agent view under REPRO-2026-00140.
What Is CVE-2026-37281?
CVE-2026-37281 is a critical OS command injection vulnerability in zenshin, an Electron application, where the Express backend's /stream-to-vlc route passes an unsanitized url query parameter into a shell command, letting any unauthenticated actor who can reach the backend port execute arbitrary commands. Pruva reproduced it (reproduction REPRO-2026-00140).
CVE-2026-37281 Severity & CVSS Score
CVE-2026-37281 is rated critical severity, with a CVSS base score of 9.8 out of 10.
Critical — the most severe class — typically remotely exploitable with severe impact. Treat as an emergency.
How to Reproduce CVE-2026-37281
pruva-verify REPRO-2026-00140 curl -O https://pruva.dev/api/v1/reproductions/REPRO-2026-00140/artifacts/reproduction_steps.sh && chmod +x reproduction_steps.sh && ./reproduction_steps.sh Proof of Reproduction for CVE-2026-37281
Reproduced by Pruva's autonomous agents — 190 tool calls over 28 min. Full root-cause analysis and the complete transcript are below.
How the agent worked
Root Cause and Exploit Chain for CVE-2026-37281
Summary
zenshin is an Electron application with an embedded Express HTTP backend. The backend route GET /stream-to-vlc takes a url query parameter and interpolates it unsanitized into a shell command executed via child_process.exec. A crafted url value containing shell metacharacters (e.g., a closing quote followed by a command separator) allows arbitrary command execution on the host, resulting in unauthenticated remote code execution for any actor that can reach the backend port.
Impact
- Package/component affected:
zenshin(Electron/Express backend) - Affected versions:
< 2.7.0 - Fixed version:
2.7.0(commit7d31c6edfbac978f0ad44c66d761bab9dcd2fa27) - Risk level: Critical — CVSS 3.1 base 9.8
- Consequences: Unauthenticated attackers on the local network (or any host that can reach the Express port) can execute arbitrary OS commands as the user running zenshin.
Root Cause
In the vulnerable commit (7d31c6edfbac978f0ad44c66d761bab9dcd2fa27~1), the /stream-to-vlc route in Electron/zenshin-electron/src/main/index.js constructs a shell command by directly interpolating the user-supplied url query parameter:
const vlcPath = '"C:\\Program Files (x86)\\VideoLAN\\VLC\\vlc.exe"'
const vlcCommand = `${vlcPath} "${url}"`
exec(vlcCommand, (error) => { ... })
Because exec invokes /bin/sh -c (or cmd.exe /c on Windows), any shell metacharacters in url are interpreted by the shell. An attacker can break out of the double-quote wrapper with a payload such as x"; touch /tmp/pwned; echo "x, causing the shell to execute the injected touch /tmp/pwned command after the (non-existent) VLC executable fails.
The fix commit (7d31c6edfbac978f0ad44c66d761bab9dcd2fa27) completely removes the /stream-to-vlc Express endpoint and replaces the ipcMain handler with spawn, passing the player path and URL as separate array arguments with shell: false, which prevents shell interpretation entirely.
Reproduction Steps
The reproduction script is repro/reproduction_steps.sh. It performs the following steps:
- Checks out the vulnerable commit (
7d31c6edfbac978f0ad44c66d761bab9dcd2fa27~1). - Installs dependencies and builds the project with
npm run buildinsideElectron/zenshin-electron. - Runs the actual built
out/main/index.jswith a Node.js mock harness that stubselectron,@electron-toolkit/utils, andelectron-deeplink, allowing the Express backend to start without a real Electron runtime. - Sends a crafted
GET /stream-to-vlc?url=...request with the payloadx"; touch /tmp/pwned; echo "x. - Verifies that
/tmp/pwnedis created, proving arbitrary command execution. - Repeats steps 1–5 with the fixed commit (
7d31c6edfbac978f0ad44c66d761bab9dcd2fa27). - Verifies that the endpoint returns
404 Cannot GET /stream-to-vlcand/tmp/pwnedis NOT created.
Evidence
- Vulnerable commit result:
statusCode=200,responseBody="VLC launched successfully",pwned_exists=true - Fixed commit result:
statusCode=404,responseBody="Cannot GET /stream-to-vlc",pwned_exists=false - Log files:
logs/vulnerable.json— HTTP response and sentinel file state for the vulnerable buildlogs/fixed.json— HTTP response and sentinel file state for the fixed buildlogs/run.log— full build and execution logs
- Runtime manifest:
repro/runtime_manifest.jsoncaptures the structured verdict.
Recommendations / Next Steps
- Fix approach: Remove or replace
execwithspawnusing an array of arguments andshell: false, as the upstream fix does. This prevents the shell from parsing user input. - Input validation: If the endpoint must be retained, strictly validate the
urlparameter against an allow-list of safe stream URL patterns before passing it to any process launcher. - Network binding: Bind the Express backend to
127.0.0.1only (also done in the fix) to reduce the attack surface. - Testing: Add integration tests that attempt shell injection against
/stream-to-vlcand similar endpoints to prevent regressions.
Additional Notes
- Idempotency: The reproduction script was run twice consecutively with identical results on both runs.
- Edge cases / limitations: The reproduction uses a mock Electron environment because a real Electron GUI cannot run in a headless CI/container environment. The mock stubs only Electron-specific APIs (window creation, IPC, deeplinks); the Express backend and the vulnerable route handler are the actual transpiled code from the project build.
CVE-2026-37281 Reproduction Transcript
The agent's step-by-step process — every tool call, every handoff, the moment the exploit fired.
Full session Replay every step — scrub the timeline or play it back.
git clone --depth=100 https://github.com/hitarth-gg/zenshin.git external/zenshinCloning into 'external/zenshin'...
Artifacts and Evidence for CVE-2026-37281
Scripts, logs, diffs, and output captured during the reproduction.
No artifacts available
How to Fix CVE-2026-37281
FAQ: CVE-2026-37281
How does the CVE-2026-37281 command injection attack work?
How severe is CVE-2026-37281?
How can I reproduce CVE-2026-37281?
References for CVE-2026-37281
Authoritative sources for CVE-2026-37281 — official vulnerability databases and the upstream advisory. Pruva's reproduction verifies the issue firsthand; these are the primary records to corroborate it.