CVE-2026-26831 textract is vulnerable to OS Command Injection
Attackers can execute arbitrary OS commands by providing malicious filenames to the textract library's file extraction functions.
- 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-26831?
CVE-2026-26831 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
textract through 2.5.0 is vulnerable to OS Command Injection via the file path parameter in multiple extractors. When processing files with malicious filenames, the filePath is passed directly to child_process.exec() in lib/extractors/doc.js, rtf.js, dxf.js, images.js, and lib/util.js with inadequate sanitization
Which versions are affected by CVE-2026-26831?
2 open source packages ship an affected version, including textract. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
textract npm | All versions to 2.5.0 | None |
textract npm | All versions to 2.5.0 | None |
Products include Dbashford Textract.
How do I fix CVE-2026-26831?
No fix has been published for CVE-2026-26831 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-26831 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-26831 exists.
Public exploit code: 1 proofs of concept on GitHub.
Sources
Also known as GHSA-9pcj-m5rr-p28g.