Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. textract
  4. ›
  5. CVE-2026-26831

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

March 25, 2026 (updated March 31, 2026)

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

References

  • github.com/advisories/GHSA-9pcj-m5rr-p28g
  • github.com/dbashford/textract
  • github.com/dbashford/textract/blob/master/lib/extractors/doc.js
  • github.com/dbashford/textract/blob/master/lib/extractors/rtf.js
  • github.com/dbashford/textract/blob/master/lib/util.js
  • github.com/zebbernCVE/CVE-2026-26831
  • nvd.nist.gov/vuln/detail/CVE-2026-26831
  • www.npmjs.com/package/textract

Code Behaviors & Features

Detect and mitigate CVE-2026-26831 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 2.5.0

Solution

Unfortunately, there is no solution available yet.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

npm/textract/CVE-2026-26831.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 12:20:22 +0000.