Impact
doc-recog through 1.1.6 contains an OS command injection vulnerability that allows attackers to execute commands by supplying crafted document paths to recog() or tag(). Attackers can embed $(...) or backtick command substitution in the file path, which DocData._readPDF passes to a shell-based pdftotext exec call, running commands with Node.js process privileges. The flaw directly injects user-supplied data into a shell command, enabling arbitrary command execution, a classic instance of CWE‑78.
Affected Systems
The affected product is the Node.js library doc‑recog from the vendor zepspaiva, specifically versions up to and including 1.1.6. Any application that imports doc‑recog and calls the functions recog() or tag() with user‑controlled file paths is vulnerable. No other versions or related products were listed in the CNA data.
Risk and Exploitability
The CVSS score of 9.3 reflects a high severity and a local or remote threat model depending on how the library is used. EPSS score of 0.02727 indicates a low but non‑zero exploitation probability; the KEV listing is absent, so no known widespread attacks have been reported. The likely attack vector is a crafted file path supplied to tag() or recog(), which may be possible remotely if the calling application processes documents from untrusted sources, or locally if an attacker can influence the input. The impact, if exploited, would be equivalent to running arbitrary commands on the host running the Node.js process.
OpenCVE Enrichment