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

Critical 9.8 Published Updated

Attackers can execute arbitrary OS commands via unsanitized file paths in the recognize function of the node-tesseract-ocr library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-26832?

CVE-2026-26832 is a critical command injection vulnerability in n/a, published on 25 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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

Weakness: CWE-78

Which versions are affected by CVE-2026-26832?

2 open source packages ship an affected version, including node-tesseract-ocr. It affects 1 product.

PackageAffectedFixed in
node-tesseract-ocr npmAll versions to 2.2.1None
node-tesseract-ocr npmAll versions to 2.2.1None

Products include Zapolnoch Tesseract Ocr.

How do I fix CVE-2026-26832?

No fix has been published for CVE-2026-26832 yet. Limit exposure of the affected software until one is available.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2026-26832 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-26832 exists.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-8j44-735h-w4w2.

Is CVE-2026-26832 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free