CVE-2026-26830

Published Mar 25, 2026 CVSS 3.1 · 9.8 Critical EPSS 2.6% KEV · Not listed
Description
pdf-image (npm package) through version 2.0.0 allows OS command injection via the pdfFilePath parameter. The constructGetInfoCommand and constructConvertCommandForPage functions use util.format() to interpolate user-controlled file paths into shell command strings that are executed via child_process.exec()

Analysis

AI-generated

Technical impact

The pdf‑image npm package contains a flaw where user‑controlled pdfFilePath values are directly interpolated into shell command strings via util.format() and executed with child_process.exec. Because the path is not properly validated, an attacker can append arbitrary shell commands, leading to the execution of any command with the privileges of the Node.js process. This vulnerability is classified as CWE‑94 and can compromise confidentiality, integrity, and availability of the host system.

Affected Systems

All Node.js applications that depend on pdf‑image version 2.0.0 or earlier are affected, regardless of operating system or deployment environment. The issue resides entirely in the JavaScript library, so any project that accepts external PDF file paths and uses pdf‑image for image extraction is at risk. No vendor or OS is singled out in the CVE data.

Risk and Exploitability

The CVSS score of 9.8 indicates a high severity. With an EPSS score of 2 % the likelihood of automated exploitation is low, but the possible impact is catastrophic. Based on the description, it is inferred that a remote attacker can trigger the injection by providing a malicious pdfFilePath through web requests, file uploads, or inter‑process communication. Once executed, the attacker gains full control of the host with whatever privileges the Node.js process runs under. The vulnerability is not listed in the CISA KEV catalog, but its severity warrants top‑priority mitigation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the pdf‑image npm package to any release newer than 2.0.0 that resolves the command injection issue
  • If an upgrade is not possible, validate and sanitize the pdfFilePath input to allow only trusted characters and directories before constructing the shell command
  • Run the Node.js process with the least privileges required and consider isolating it in a container to contain potential exploitation

Generated by OpenCVE AI on June 18, 2026 at 13:28 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-q5mh-72xg-628w pdf-image has an OS Command Injection Vulnerability through its pdfFilePath parameter
History
Type Values Removed Values Added
Title OS Command Injection in pdf‑image npm Package via File Path Parameter
Type Values Removed Values Added
Title OS Command Injection in pdf‑image npm Package via File Path Parameter
Type Values Removed Values Added
Title OS Command Injection in pdf‑image npm Package
Type Values Removed Values Added
Title OS Command Injection in pdf‑image npm Package
Type Values Removed Values Added
First Time appeared Pdf-image Project
Pdf-image Project pdf-image
CPEs cpe:2.3:a:pdf-image_project:pdf-image:*:*:*:*:*:node.js:*:*
Vendors & Products Pdf-image Project
Pdf-image Project pdf-image
Type Values Removed Values Added
Weaknesses CWE-94
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Title OS Command Injection via Untrusted File Path in pdf-image NPM Package
Weaknesses CWE-78
Type Values Removed Values Added
First Time appeared Mooz
Mooz pdf-image
Vendors & Products Mooz
Mooz pdf-image
Type Values Removed Values Added
Title OS Command Injection via Untrusted File Path in pdf-image NPM Package
Weaknesses CWE-78
Type Values Removed Values Added
Description pdf-image (npm package) through version 2.0.0 allows OS command injection via the pdfFilePath parameter. The constructGetInfoCommand and constructConvertCommandForPage functions use util.format() to interpolate user-controlled file paths into shell command strings that are executed via child_process.exec()
References
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AC:L/AV:N/A:H/C:H/I:H/PR:N/S:U/UI:N'}

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Mar 27, 2026, 3:58 AM
Reserved
Feb 16, 2026, 12:00 AM
Status
Analyzed
Published
Mar 25, 2026, 3:16 PM
Modified
Jun 17, 2026, 10:26 AM