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

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

- **Severity:** Critical 9.8 (`CVSS:3.1/AC:L/AV:N/A:H/C:H/I:H/PR:N/S:U/UI:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 25 Mar 2026
- **Updated:** 25 Mar 2026
- **Also known as:** GHSA-8j44-735h-w4w2

## 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 (Improper Neutralization of Special Elements used in an OS Command)

## Which versions are affected by CVE-2026-26832?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `node-tesseract-ocr` | npm | All versions to 2.2.1 | None |
| `node-tesseract-ocr` | npm | All versions to 2.2.1 | None |

Products: 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.

## 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:

- Advisory for node-tesseract-ocr  ⌯⌲ 50 000 weekly downloads (github_poc): https://github.com/zebbernCVE/CVE-2026-26832

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-26832 and fix it if it is affected.

What it is: 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.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-26832 exists.

Affected packages and fixed versions:
- node-tesseract-ocr (npm): affected all versions up to 2.2.1; no fix listed
- node-tesseract-ocr (npm): affected all versions up to 2.2.1; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-26832/ (Markdown: https://insights.sbomify.com/CVE-2026-26832/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-26832
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-26832
- OSV: https://osv.dev/vulnerability/CVE-2026-26832

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-26832/
Summaries are generated and may contain mistakes; the official description above is the record.
