CVE-2020-7632: OS Command Injection in node-mpv

node-mpv Updated 02 Oct 2025

Summary

07/01/2022
No i
Critical
9.8

CVE-2020-7632: OS Command Injection in node-mpv. Affects node-mpv versions < 1.4.3. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

node-mpv is an npm package that provides a Node.js interface for controlling the mpv media player. It allows developers to interact with mpv through JavaScript code, enabling them to play, pause, seek, and control various aspects of media playback. However, versions up to 1.4.3 of node-mpv are vulnerable to OS Command Injection. This vulnerability allows an attacker to execute arbitrary commands by exploiting the options argument of the package.

Vulnerability Detail

The OS Command Injection vulnerability in node-mpv arises from insufficient input validation and sanitization. Attackers can craft malicious input that includes arbitrary commands, which are executed by the package without proper validation. This can lead to unauthorized command execution on the host system, potentially resulting in various security risks such as remote code execution, data exfiltration, or system compromise. The severity of this vulnerability is rated as CRITICAL with a CVSS score of 9.8.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, developers can implement input validation and sanitization in their own code to mitigate the risk of command injection. By carefully validating and filtering user input before passing it to node-mpv, the likelihood of successful command injection attacks can be reduced. Here is an example of input validation and sanitization using the 'shell-quote' package:

const shellQuote = require('shell-quote');

function sanitizeInput(input) {
  return shellQuote.quote([input]);
}

const sanitizedOptions = sanitizeInput(userInput);
mpv.play(sanitizedOptions);

Conclusion

The OS Command Injection vulnerability in node-mpv (CVE-2020-7632) poses a significant security risk, allowing attackers to execute arbitrary commands on the host system. It is crucial for developers to upgrade to a patched version of node-mpv and implement proper input validation and sanitization to prevent command injection attacks. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for node-mpv →

Share this vulnerability

FAQ

node-mpv is an npm package that provides a Node.js interface for controlling the mpv media player. It allows developers to interact with mpv through JavaScript code, enabling them to play, pause, seek, and control various aspects of media playback.

OS Command Injection is a vulnerability that allows an attacker to execute arbitrary commands on a host system by injecting malicious input. In the case of node-mpv, this vulnerability can be exploited by crafting malicious input in the options argument, leading to unauthorized command execution.

The OS Command Injection vulnerability in node-mpv can result in various security risks, including remote code execution, data exfiltration, or complete system compromise. Attackers can leverage this vulnerability to execute arbitrary commands with the privileges of the user running the affected application.

To fix this vulnerability, it is recommended to upgrade to a patched version of node-mpv (1.4.4 or later). Additionally, ensure that user input is properly validated and sanitized to prevent command injection attacks.

As a temporary workaround, developers can implement input validation and sanitization in their own code to mitigate the risk of command injection. By carefully validating and filtering user input before passing it to node-mpv, the likelihood of successful command injection attacks can be reduced.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback