OS Command InjectionWeakness · CWE-78

CVE-2026-49492

HIGH · 8.8 CVSS v3.1 Published 2026-06-05
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
95/100
Remediation priority · Urgent
Remotely reachable No privileges

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Command injection vulnerability in Markdown Preview Enhanced before v0.8.28 where untrusted inputs from markdown documents (diagram filename attributes, imported file paths, and latex_engine code-chunk attributes) are passed through a shell without validation. On Windows systems, a specially crafted markdown document can inject and execute operating system commands when the document is previewed.

MitigationUpgrade Markdown Preview Enhanced to version 0.8.28 or later, which validates inputs and passes them as literal arguments instead of through a shell interpreter.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check installed version of Markdown Preview Enhanced
    Locate the extension in your editor's extension manager (VS Code, Atom, etc.) and view the installed version number. For VS Code, open Extensions panel, search for 'Markdown Preview Enhanced', and note the version shown.
    Affected if Version number is below 0.8.28 (e.g., 0.8.27, 0.8.20, etc.)
  2. Confirm operating system is Windows
    Check which operating system your environment is running. This can be done via system information or by running 'systeminfo' on Windows or 'uname' on Unix-like systems.
    Affected if Running on Windows; the vulnerability specifically affects Windows environments
  3. Verify diagram rendering feature is in use
    Review your markdown documents for presence of diagram syntax that uses filename attributes (such as mermaid or graphviz diagrams with 'filename' parameters). Open a markdown file and inspect any diagram blocks.
    Affected if Markdown documents contain diagram blocks with filename attributes that could be passed to shell
  4. Verify file import feature is in use
    Search your markdown documents for import statements or file references (such as '<!-- import file: path/to/file -->' or similar import syntax used by this extension).
    Affected if Markdown documents contain imported file paths that are processed by the extension
  5. Verify LaTeX code chunk feature is configured
    Check markdown documents for code chunk blocks that specify a latex_engine attribute (e.g., '```{latex_engine: xetex}' or similar). Also check extension settings for latex_engine configuration.
    Affected if LaTeX code chunks with latex_engine attributes are present in documents or configured in settings

You are affected if running Markdown Preview Enhanced on Windows with a version below 0.8.28 and using any of the diagram filename, file import, or latex_engine code-chunk features in your markdown documents.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Upgrade Markdown Preview Enhanced to version 0.8.28 or later, which validates inputs and passes them as literal arguments instead of through a shell interpreter.

Recommended fix High confidence

Markdown Preview Enhanced version 0.8.28

  1. Check the current installed version of Markdown Preview Enhanced (MPE) in your environment
  2. Identify the package manager used for installation (e.g., npm, Visual Studio Code extension marketplace, etc.)
  3. For VS Code extensions: Open VS Code, go to Extensions, search for Markdown Preview Enhanced, and update if a version before 0.8.28 is installed
  4. For npm installation: Run 'npm install [email protected]' or 'npm update markdown-preview-enhanced' to get the fixed version
  5. Verify the installed version is 0.8.28 or later after updating
  6. Test that Markdown preview functionality works correctly after the upgrade
  7. If using custom configurations for diagram filename, imported file paths, or latex_engine settings, verify they work with the new version's input validation
Caveat Minimal risk - the fix adds validation and passes inputs as literal arguments rather than through a shell, which should not break正常使用 but may require adjusting any custom paths that rely on shell expansion

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation2.0 h
  • Implementation4.0 h
  • Testing2.0 h
  • Review / QA1.0 h
9.0 hours of engineering $1,600
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,560.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-49492 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-49492 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data