Skip to main content
Vulnerability Database/CVE-2026-107703

CVE-2026-107703: node-convert RCE Vulnerability

CVE-2026-107703 is a remote code execution flaw in node-convert that enables attackers to execute arbitrary shell commands through unsanitized input parameters. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-107703 Overview

CVE-2026-107703 is an operating system command injection vulnerability affecting the @enmaso/node-convert npm package through version 1.0.0. The flaw resides in convert.js, which passes unsanitized filepath and convertTo arguments directly into an ImageMagick command executed through Node.js child_process.exec(). Attackers can inject shell metacharacters or a single quote to break out of the intended command and execute arbitrary operating system commands with the privileges of the Node.js process. The vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command.

Critical Impact

Unauthenticated attackers can achieve arbitrary command execution on hosts running @enmaso/node-convert through 1.0.0, leading to full compromise of the Node.js process context.

Affected Products

  • @enmaso/node-convert npm package versions through 1.0.0
  • Applications invoking convert.js with attacker-controlled filepath arguments
  • Applications invoking convert.js with attacker-controlled convertTo arguments

Discovery Timeline

  • 2026-10-08 - CVE-2026-107703 published to NVD
  • 2026-10-08 - Last updated in NVD database

Technical Details for CVE-2026-107703

Vulnerability Analysis

The @enmaso/node-convert module provides a thin wrapper around the ImageMagick convert binary. The convert.js script accepts two caller-supplied strings, filepath and convertTo, and concatenates them into a shell command string. That string is then handed to child_process.exec(), which spawns a shell to interpret the entire command.

Because exec() invokes /bin/sh -c, any shell metacharacter in the input is parsed by the shell rather than treated as literal text. Characters such as ;, |, &, backticks, $(), and single quotes allow an attacker to terminate the ImageMagick invocation and append arbitrary commands. The injected commands execute under the same user and permissions as the Node.js runtime.

Root Cause

The root cause is the use of unsanitized string concatenation into a shell-interpreted execution function. The module does not validate inputs, does not quote arguments safely, and does not use a safer API such as child_process.execFile() or spawn() with an argument array, which would bypass the shell entirely.

Attack Vector

An attacker who can influence either the filepath or convertTo parameter can inject shell payloads. In applications that expose file conversion over HTTP, these parameters frequently originate from user input such as query strings, form fields, or JSON bodies. The attack requires no authentication and no user interaction when the vulnerable endpoint is reachable over the network.

See the published proof-of-concept at GitHub Gist PoC Code, the upstream source at GitHub Node Convert Project, the affected routine at GitHub Node Convert Code Snippet, and the VulnCheck Advisory for Node Convert.

Stop Remote Code Execution Before It Runs

Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.

Stop Exploit Attempts

Detection Methods for CVE-2026-107703

Indicators of Compromise

  • Child processes of node executing shell builtins or commands such as sh, bash, curl, wget, nc, or python without a legitimate conversion workload
  • ImageMagick convert invocations containing shell metacharacters including ;, |, `, $(, or stray single quotes in process arguments
  • Outbound network connections initiated by the Node.js process to unexpected destinations shortly after conversion requests
  • Unusual file writes or new executables created in web-accessible directories after a conversion endpoint is called

Detection Strategies

  • Inspect application logs for conversion requests whose filepath or convertTo parameters contain shell metacharacters or encoded variants
  • Hunt in process telemetry for node parents spawning shells that in turn spawn reconnaissance or download tooling
  • Perform software composition analysis to flag any dependency on @enmaso/node-convert at or below 1.0.0

Monitoring Recommendations

  • Enable command-line argument logging on Linux hosts and ship events to a centralized analytics platform for retrospective hunting
  • Alert on new outbound connections from Node.js workers that normally only communicate with internal services
  • Monitor file integrity on application and web root directories to catch webshell drops or binary staging

How to Mitigate CVE-2026-107703

Immediate Actions Required

  • Inventory all Node.js projects for @enmaso/node-convert in package.json and lockfiles, including transitive dependencies
  • Remove the package or replace it with a maintained alternative that uses execFile or spawn with argument arrays
  • Restrict network access to any application endpoint that currently invokes the vulnerable convert.js function
  • Run the Node.js process as a least-privileged user to limit the blast radius if exploitation occurs

Patch Information

No fixed version is identified in the published advisory at the time of writing. All versions through 1.0.0 are affected. Review the VulnCheck Advisory for Node Convert and the upstream GitHub Node Convert Project for updates on remediation.

Workarounds

  • Strictly validate filepath and convertTo against an allowlist of expected characters before passing them to the module
  • Wrap calls to the module in a safer execution path that invokes ImageMagick via child_process.execFile('convert', [args]) to avoid shell interpretation
  • Reject any input containing shell metacharacters, backticks, quotes, or null bytes at the application boundary
  • Run conversion workloads in an isolated container or sandbox with no outbound network access and read-only filesystem where possible
bash
# Configuration example: audit and remove the vulnerable package
npm ls @enmaso/node-convert
npm uninstall @enmaso/node-convert

# Safer invocation pattern (illustrative) using execFile to bypass the shell
# node -e "require('child_process').execFile('convert', [inputPath, outputPath], cb)"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.