All reports
Critical

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

Affected versions

Affected versions
<= 2.2.1
Fixed version
Not reported

Exploitation

CVE-2026-26832

Probability of exploitation in the next 30 days: 1.94%

FIRST EPSS · 2026-11-20

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

Links