CVE-2026-26832 Details
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
A command injection vulnerability has been identified in the 'node-tesseract-ocr' npm package, which serves as a Node.js wrapper for Tesseract OCR. This vulnerability exists in all versions up to and including 2.2.1. The issue arises in the 'recognize()' function within 'src/index.js', where the file path parameter is improperly sanitized before being concatenated into a shell command. This command is then executed using 'child_process.exec()', allowing for potential OS command injection.
As of March 24, 2026, no fixed version is available. Users are advised to treat input paths as untrusted, avoid building command strings with 'join(" ")', and use 'execFile()' or 'spawn()' with explicit arguments instead. Alternatively, consider moving to a maintained wrapper or safely calling Tesseract from custom code.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Mar 25, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/zapolnoch/node-tesseract-ocr | [email protected] | Product |
| https://github.com/zapolnoch/node-tesseract-ocr/blob/master/src/index.js | [email protected] | Product |
| https://github.com/zebbernCVE/CVE-2026-26832 | [email protected] | MitigationThird Party Advisory |
| https://www.npmjs.com/package/node-tesseract-ocr | [email protected] | Product |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | CISA-ADP |
Affected Products
| Product | Versions |
|---|---|
| zapolnoch tesseract ocr | <= 2.2.1 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 5, 2026 | Initial Analysis | [email protected] |
| Mar 25, 2026 | CVE Modified | CISA-ADP |
| Mar 25, 2026 | New CVE Received | [email protected] |