CVE-2026-49492 Markdown Preview Enhanced OS Command Injection in External File and Link Opening
Attackers can execute arbitrary OS commands on Windows by crafting a markdown document with malicious attributes in Markdown Preview Enhanced.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2026-49492?
CVE-2026-49492 is a high-severity command injection vulnerability in shd101wyy Markdown Preview Enhanced, published on 5 Jun 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Markdown Preview Enhanced before 0.8.28 opens external files and links from the preview through a shell and does not validate untrusted inputs taken from the markdown document - the diagram filename attribute, imported file paths, and the latex_engine code-chunk attribute. On Windows, a crafted markdown document can inject operating system commands that execute when the document is previewed. Fixed in 0.8.28 by passing these inputs as literal arguments instead of through a shell and validating them before use.
Weakness: CWE-78
Which versions are affected by CVE-2026-49492?
How do I fix CVE-2026-49492?
No fix has been published for CVE-2026-49492 yet. Limit exposure of the affected software until one is available.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2026-49492 being exploited?
There is no known exploitation of CVE-2026-49492 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Sources
Also known as GHSA-3vxg-8vgp-994w.