| Reporter | Title | Published | Views | Family All 16 |
|---|---|---|---|---|
| Exploit for CVE-2026-26832 | 24 Mar 202616:15 | – | githubexploit | |
| CVE-2026-26832 | 25 Mar 202617:36 | – | circl | |
| Tesseract 安全漏洞 | 25 Mar 202600:00 | – | cnnvd | |
| CVE-2026-26832 | 25 Mar 202600:00 | – | cve | |
| CVE-2026-26832 | 25 Mar 202600:00 | – | cvelist | |
| EUVD-2026-15461 | 25 Mar 202618:31 | – | euvd | |
| node-tesseract-ocr is vulnerable to OS Command Injection through unsanitized recognize() function parameter | 25 Mar 202618:31 | – | github | |
| CVE-2026-26832 | 25 Mar 202616:16 | – | nvd | |
| GHSA-8J44-735H-W4W2 node-tesseract-ocr is vulnerable to OS Command Injection through unsanitized recognize() function parameter | 25 Mar 202618:31 | – | osv | |
| 📄 node-tesseract-ocr 2.2.1 Command Injection | 27 Apr 202600:00 | – | packetstorm |
# CVE-2026-26832: OS command injection in node-tesseract-ocr
## Summary
`node-tesseract-ocr` through version `2.2.1` allows OS command
injection in `recognize()` in `src/index.js`. The package builds a
shell command string and executes it with `child_process.exec()`.
Because the input path is only wrapped in double quotes, an attacker
can inject shell syntax through a crafted file path.
## Affected product
| Product | Affected versions | Fixed version |
| --- | --- | --- |
| node-tesseract-ocr | all versions through 2.2.1 | no fix available as of 2026-03-24 |
## Vulnerability details
- CVE ID: `CVE-2026-26832`
- CWE: `CWE-78` - OS Command Injection
- CVSS 3.1: `9.8` (`Critical`)
- Vector: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Affected component: `src/index.js`, `recognize()`
The vulnerable pattern is:
```js
const command = [binary, inputOption, "stdout", ...options].join(" ");
exec(command, ...);
```
That command string inherits shell parsing. A malicious file path can
break out of the quoted argument.
## Technical impact
Applications that run OCR on user-supplied images can expose the host
system to command execution if they pass untrusted paths into
`recognize()`.
## Proof of concept
```text
test.jpg"; touch /tmp/pwned; echo "x
```
## Mitigation
No fixed npm release is available at the time of writing.
If you still depend on this package:
1. Treat input paths as untrusted.
2. Stop building shell command strings with `join(" ")`.
3. Use `execFile()` or `spawn()` with explicit arguments.
4. Move to a maintained wrapper or call Tesseract safely from your own
code.
## References
- https://www.npmjs.com/package/node-tesseract-ocr
- https://github.com/zapolnoch/node-tesseract-ocr
- https://github.com/zapolnoch/node-tesseract-ocr/blob/master/src/index.jsData
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation