Description
Turnpress through 0.4.2 contains an OS command injection vulnerability that allows attackers to execute shell commands by supplying .docx files with crafted names. The convertDocxToHtml function in src/converter.ts invokes pandoc through execa with shell:true, so shell metacharacters in the --docx path run with the victim's privileges during convert or create.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| jinghaihan | turnpress | ≤ 0.4.2 | — |
References
- https://github.com/jinghaihan/turnpress/pull/2 patch issue-tracking
- https://github.com/jinghaihan/turnpress/blob/v0.4.2/src/converter.ts#L33-L61 technical-description
- VulnCheck Advisory: Turnpress through 0.4.2 OS Command Injection via Crafted .docx File Names third-party-advisory