Skip to content

CVE-2026-26832 node-tesseract-ocr is vulnerable to OS Command Injection through unsanitized recognize() function parameter

CriticalCVSS 9.8 EPSS 1.9% PoC
Published
Updated
Exploit status
Proof-of-concept only
CISA SSVC
Proof of concept public · automatable: no · technical impact: partial

Description

node-tesseract-ocr is an npm package that provides a Node.js wrapper for Tesseract OCR. In all versions through 2.2.1, the recognize() function in src/index.js is vulnerable to OS Command Injection. The file path parameter is concatenated into a shell command string and passed to child_process.exec() without proper sanitization

Upgrade path

2 packages: 2 fixed.

PackageAffectedFixed inStatus
npm node-tesseract-ocr(npm) <= 2.2.1 after 2.2.1 Fixed
zapolnoch tesseract ocr <= 2.2.1 after 2.2.1 Fixed

Affected products

ProductAffected versionsFixed in
npm node-tesseract-ocr(npm) <= 2.2.1 No fix listed
zapolnoch tesseract ocr <= 2.2.1 No fix listed

References