# CVE-2026-26831: textract is vulnerable to OS Command Injection

- Severity: Critical 9.8 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.81%, higher than 86% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-03-25T00:00:00.000Z
- Modified: 2026-06-17T10:26:21.513Z
- Also known as: GHSA-9pcj-m5rr-p28g
- Weaknesses: CWE-78, CWE-94
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: mitre

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

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- textract (npm): up to 2.5.0
- dbashford textract: up to 2.5.0

## Every score

- CISA-ADP: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/zebbernCVE/CVE-2026-26831> (exploit, third-party-advisory, web)
- <https://www.npmjs.com/package/textract> (product, web)
- <https://github.com/dbashford/textract> (package, product)
- <https://github.com/dbashford/textract/blob/master/lib/extractors/doc.js> (product, web)
- <https://github.com/dbashford/textract/blob/master/lib/extractors/rtf.js> (product, web)
- <https://github.com/dbashford/textract/blob/master/lib/util.js> (product, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-26831> (advisory)

## Sources

- CVE List: [CVE-2026-26831](https://www.cve.org/CVERecord?id=CVE-2026-26831), CVE Terms of Use, modified 2026-03-28
- GitHub Advisory Database: [GHSA-9pcj-m5rr-p28g](https://github.com/advisories/GHSA-9pcj-m5rr-p28g), CC-BY-4.0, modified 2026-03-31
- NVD: [CVE-2026-26831](https://nvd.nist.gov/vuln/detail/CVE-2026-26831), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-26831 · Whole record: https://cve.day/CVE-2026-26831.json · Rebuilt by cve.day 2026-11-25T22:59:16.734Z
