GitHub Advisoryadvisory · npm

GHSA-8j44-735h-w4w2 node-tesseract-ocr is vulnerable to OS Command Injection through unsanitized recognize() function parameter

CRITICAL Published 2026-03-25 Modified 2026-03-27 Official page ↗
Aliases
CVE-2026-26832
Ecosystem
npm
Packages
node-tesseract-ocr
Severity
Critical
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weaknesses
CWE-78
Reviewed
2026-03-27

Affected packages

• npm node-tesseract-ocr: <= 2.2.1 (no fix yet)

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

Related

Alias · CVE (1)

  • CVE-2026-26832 node-tesseract-ocr is an npm package that provides a Node.js wrapper for Tesseract OCR. vulnerability

Weakness · CWE (1)

  • CWE-78 Improper Neutralization of Special Elements used in an OS Command weakness

References