Advisory

GHSA-8j44-735h-w4w2

Also known as: CVE-2026-26832

Summary

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

Details

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

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2026-03-25 18:31 UTC
Modified
2026-03-27 19:56 UTC

Affected packages and fixes

node-tesseract-ocr

npm · All systems

Affected

  • introduced 0, last affected 2.2.1 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences