/

CVE-2026-110640

Severity:

CRITICAL RISK

(9.8)

OS Command Injection (CWE-78) in Whisper-node Package

CVE-2026-110640

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Arbitrary Command 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

Whisper-node through version 1.1.1 contains an OS command injection vulnerability in the command construction used by its whisper() function. When attacker-controlled values reach filePath or whisperOptions.language, shell metacharacters or command substitutions may cause commands to execute with the privileges of the Node.js process.

Whisper-node through version 1.1.1 contains an OS command injection vulnerability in the command construction used by its whisper() function. When attacker-controlled values reach filePath or whisperOptions.language, shell metacharacters or command substitutions may cause commands to execute with the privileges of the Node.js process.

Affected context

The vulnerability occurs in deployments using Whisper-node through 1.1.1 where values supplied to whisper() can influence the command string generated by createCppCommand(). Risk is greater when filePath or whisperOptions.language originates from untrusted requests, uploaded-file metadata, user-controlled configuration, or another attacker-influenced source, and when the resulting command is executed through a shell.

The vulnerability occurs in deployments using Whisper-node through 1.1.1 where values supplied to whisper() can influence the command string generated by createCppCommand(). Risk is greater when filePath or whisperOptions.language originates from untrusted requests, uploaded-file metadata, user-controlled configuration, or another attacker-influenced source, and when the resulting command is executed through a shell.

Exploit preconditions

  • Attack surface: The whisper() API and its command-construction path
  • Required access: Ability to supply or influence filePath or

whisperOptions.language

  • Trigger point: Invocation of shelljs.exec() after

createCppCommand() builds the command string

  • Why exploitation is possible: Input values are incorporated into a

shell command without sufficiently separating data from executable shell

syntax

  • Attack surface: The whisper() API and its command-construction path
  • Required access: Ability to supply or influence filePath or

whisperOptions.language

  • Trigger point: Invocation of shelljs.exec() after

createCppCommand() builds the command string

  • Why exploitation is possible: Input values are incorporated into a

shell command without sufficiently separating data from executable shell

syntax

Why this happens

The underlying bug is OS command injection, mapped to CWE-78. Application data is inserted into a command string and passed to a shell-executing API, allowing shell interpretation to treat attacker-controlled characters as command syntax rather than ordinary argument data. The insecure pattern is constructing commands through string concatenation or interpolation instead of invoking a target executable with a non-shell argument interface and strict input constraints.

The underlying bug is OS command injection, mapped to CWE-78. Application data is inserted into a command string and passed to a shell-executing API, allowing shell interpretation to treat attacker-controlled characters as command syntax rather than ordinary argument data. The insecure pattern is constructing commands through string concatenation or interpolation instead of invoking a target executable with a non-shell argument interface and strict input constraints.

Potential impact

  • An attacker may execute arbitrary operating-system commands.
  • Commands could run with the privileges of the Node.js process.
  • The application host may be compromised or used for lateral movement.
  • Sensitive files, credentials, or environment data could be accessed.
  • Availability, integrity, or confidentiality of application data could be affected.
  • An attacker may execute arbitrary operating-system commands.
  • Commands could run with the privileges of the Node.js process.
  • The application host may be compromised or used for lateral movement.
  • Sensitive files, credentials, or environment data could be accessed.
  • Availability, integrity, or confidentiality of application data could be affected.

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from the

command-execution path and reducing trust in external input.

Common defensive patterns include:

  • Prefer direct process-spawn APIs with an executable and separate,

validated argument arrays rather than shell command strings.

  • Avoid shell-enabled execution for values derived from users, files, or

external configuration.

  • Apply allowlists and type-appropriate validation to file paths,

language identifiers, and other options.

  • Resolve paths within approved directories and reject unexpected path

structures where file access is required.

  • Run the Node.js process with the least privileges needed and isolate it

from sensitive host resources.

  • Treat escaping as a secondary safeguard rather than a replacement for

avoiding shell interpretation.

Mitigation generally focuses on removing shell interpretation from the

command-execution path and reducing trust in external input.

Common defensive patterns include:

  • Prefer direct process-spawn APIs with an executable and separate,

validated argument arrays rather than shell command strings.

  • Avoid shell-enabled execution for values derived from users, files, or

external configuration.

  • Apply allowlists and type-appropriate validation to file paths,

language identifiers, and other options.

  • Resolve paths within approved directories and reject unexpected path

structures where file access is required.

  • Run the Node.js process with the least privileges needed and isolate it

from sensitive host resources.

  • Treat escaping as a secondary safeguard rather than a replacement for

avoiding shell interpretation.

How teams detect issues like this

Detection approaches can include:

  • Static analysis rules for shell execution APIs such as shelljs.exec()

when arguments include concatenated or interpolated input.

  • Code review checks for command strings built from request data, file

metadata, environment values, or configuration.

  • Data-flow analysis tracing filePath and whisperOptions.language into

createCppCommand() and subsequent process execution.

  • Policy enforcement that bans shell execution for untrusted values and

requires direct argument-based process APIs.

  • Runtime monitoring for unexpected child processes, command interpreters,

or unusual process ancestry from the Node.js service.

  • Automated code-review and security-scanning tools can help identify

command construction and shell invocation patterns.

Detection approaches can include:

  • Static analysis rules for shell execution APIs such as shelljs.exec()

when arguments include concatenated or interpolated input.

  • Code review checks for command strings built from request data, file

metadata, environment values, or configuration.

  • Data-flow analysis tracing filePath and whisperOptions.language into

createCppCommand() and subsequent process execution.

  • Policy enforcement that bans shell execution for untrusted values and

requires direct argument-based process APIs.

  • Runtime monitoring for unexpected child processes, command interpreters,

or unusual process ancestry from the Node.js service.

  • Automated code-review and security-scanning tools can help identify

command construction and shell invocation patterns.

Sources

SourceLink
github.comgithub.com/ariym/whisper-node/blob/c72944cfa48f5c74662ff17ee2dc1d5f7624393e/src/whisper.ts#L58
github.comgithub.com/ariym/whisper-node/blob/c72944cfa48f5c74662ff17ee2dc1d5f7624393e/src/whisper.ts#L8
github.comgithub.com/ariym/whisper-node/pull/64
unpkg.comunpkg.com/whisper-node@1.1.1/dist/index.js
vulncheck.comvulncheck.com/advisories/whisper-node-through-1.1.1-os-command-injection-via-filepath-and-language

Frequently asked

questions

It can be remotely exploitable when a network-facing application passes

attacker-controlled values to whisper() without an intervening trusted

validation boundary. Exploitability depends on how the package is integrated.

The attacker needs a way to influence filePath, whisperOptions.language,

or an upstream value that is copied into either field. This may be through an

application request, uploaded content, or another exposed integration point.

The safest pattern is to avoid shell-based command execution and invoke the

intended program using a direct process API with separately supplied,

strictly validated arguments.

Define allowlisted input formats, keep untrusted data out of shell command

strings, apply least privilege to the Node.js process, and enforce static

analysis and code-review policies for process execution APIs.

It can be remotely exploitable when a network-facing application passes

attacker-controlled values to whisper() without an intervening trusted

validation boundary. Exploitability depends on how the package is integrated.

The attacker needs a way to influence filePath, whisperOptions.language,

or an upstream value that is copied into either field. This may be through an

application request, uploaded content, or another exposed integration point.

The safest pattern is to avoid shell-based command execution and invoke the

intended program using a direct process API with separately supplied,

strictly validated arguments.

Define allowlisted input formats, keep untrusted data out of shell command

strings, apply least privilege to the Node.js process, and enforce static

analysis and code-review policies for process execution APIs.

Find out what's already
exploitable in your codebase.