critical9.8
CVE-2026-26832
node-tesseract-ocr is vulnerable to OS Command Injection through unsanitized recognize() function parameter
Impact
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
Affected packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| npm | node-tesseract-ocr | <= 2.2.1 | none recorded |
Affected products
| Vendor | Product | Affected versions |
|---|---|---|
| Zapolnoch | Tesseract Ocr | through 2.2.1 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://github.com/advisories/GHSA-8j44-735h-w4w2
- https://nvd.nist.gov/vuln/detail/CVE-2026-26832
- https://github.com/zapolnoch/node-tesseract-ocr/blob/master/src/index.js
- https://github.com/zebbernCVE/CVE-2026-26832
- https://github.com/zapolnoch/node-tesseract-ocr
- https://www.npmjs.com/package/node-tesseract-ocr