/

CVE-2026-74801

Severity:

HIGH RISK

(8.2)

OS Command Injection (CWE-78) in SiYuan Workspace Path

CVE-2026-74801

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Privileged Remote Code Execution

Severity:

HIGH RISK

(8.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

SiYuan contains an operating system command injection vulnerability in the handling of workspace directory paths passed to its elevated helper process. If an attacker can create or control a workspace path containing command metacharacters and induce the Microsoft Defender exclusion workflow, arbitrary commands may execute with administrator privileges after UAC approval.

Affected context

The issue occurs in SiYuan deployments that use the Windows elevated elevator.exe helper to process Microsoft Defender exclusion requests. Risk is higher when an attacker can create or influence a workspace directory path and can cause the related administrative workflow to run. The vulnerable behavior involves constructing command-line arguments without adequately escaping path data.

Exploit preconditions

  • Attack surface: SiYuan's Windows elevated helper and Microsoft Defender exclusion workflow
  • Required access: Ability to create or control a workspace directory path, plus a way to trigger the relevant workflow
  • Trigger point: Construction and execution of the helper process command line
  • User interaction: UAC approval may be required before the elevated operation proceeds
  • Why exploitation is possible: Unescaped path data can be interpreted as command syntax rather than as a literal argument

Why this happens

The vulnerability results from incorporating workspace directory paths into command-line arguments without applying context-appropriate escaping or structured argument handling. When attacker-influenced path data reaches a command interpreter or argument-processing boundary, metacharacters may alter the intended command behavior. This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, commonly known as OS command injection.

Potential impact

  • An attacker may execute arbitrary commands with elevated privileges
  • The attacker could modify or remove local files and security settings
  • System or application data may be exposed, altered, or destroyed
  • The compromised host could be used to establish persistence or affect connected environments
  • Security controls may be weakened or bypassed

General mitigation guidance

Mitigation generally focuses on preventing user-controlled path data from becoming command syntax.

Common defensive patterns include:

  • Use structured process APIs that pass arguments separately instead of constructing shell command strings
  • Apply strict canonicalization and validation to workspace paths
  • Treat directory names and other filesystem metadata as untrusted input
  • Avoid invoking a command interpreter when a direct executable API is available
  • Use narrowly scoped administrative helpers with least-privilege permissions
  • Require explicit authorization and clear user confirmation for security-sensitive exclusion changes
  • Keep privileged operations isolated from untrusted workspace content

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying string concatenation or interpolation in process-launching code
  • Code review checks for attacker-controlled paths entering shell commands or elevated helpers
  • Tests using metacharacter-containing filenames and directories to verify literal argument handling
  • Runtime monitoring of unusual child processes launched by SiYuan or its helper executable
  • Endpoint policy alerts for unexpected Defender exclusion changes or administrative command execution
  • Automated security review tools that flag command construction from filesystem or user-controlled values

Sources

SourceLink
github.comgithub.com/siyuan-note/siyuan/security/advisories/GHSA-vmp7-pm7g-ghcc
vulncheck.comvulncheck.com/advisories/siyuan-before-local-privilege-escalation-via-elevator-exe

Frequently asked

questions

Exploitation is generally dependent on local or otherwise authorized access that permits creation or control of a workspace path and triggering of the affected workflow. It is not typically a network-only issue by itself.

The described attack path involves execution through an elevated helper after UAC approval. The exact user interaction and policy behavior depend on the Windows deployment and application workflow.

Avoid shell command construction and pass validated path values as separate arguments through a process API that does not invoke a command interpreter.

Treat paths as untrusted input, apply context-specific validation, test metacharacter-containing names, minimize privileged helper functionality, and monitor sensitive administrative operations.

Find out what's already
exploitable in your codebase.