CVE-2026-74798: SiYuan kernel Path Traversal via database_clean MCP tool
SiYuan kernel before v3.7.4 contains a path traversal vulnerability in the database_clean MCP tool. The tool performs only an empty-string check on the id parameter before passing it to RemoveUnusedAttributeView (kernel/model/attribute_view.go), which builds a filesystem path via filepath.Join without validating that id matches SiYuan's node-ID format. An authenticated MCP client can supply path traversal sequences in id to cause the kernel to copy an arbitrary file readable by the process into SiYuan's history directory (arbitrary file read) and then delete the original file (arbitrary file deletion). The corresponding HTTP API handler was hardened in GHSA-7hm9-v7vf-7g4w, but this MCP caller was not.
Security readout for executives and security teams
Plain-English summary
SiYuan versions before 3.7.4 allow an authenticated MCP client to misuse a database-cleaning tool to copy files accessible to SiYuan into its history and delete the originals. This could expose sensitive information and disrupt operations. The attacker must already possess authenticated MCP access, but exploitation is low-complexity once that access exists.
Executive priority
Treat affected, MCP-enabled deployments as an urgent remediation priority. Although authenticated access is required and active exploitation is unconfirmed, successful abuse could expose secrets and delete operational files. Prioritize internet-accessible or broadly shared MCP environments, upgrade promptly, and review recent MCP activity for suspicious use.
Technical view
The database_clean MCP tool checks only whether id is empty, then passes it to RemoveUnusedAttributeView. That function uses filepath.Join without enforcing SiYuan’s node-ID format. Traversal sequences can therefore escape the intended path, copying a process-readable file into history before deleting its original. Earlier HTTP API hardening did not cover this MCP call.
Likely exposure
Exposure is limited to SiYuan deployments earlier than 3.7.4 where an attacker can authenticate as an MCP client and invoke database_clean. Risk depends on the files readable by the SiYuan process and the attacker’s ability to retrieve copied history content. Unauthenticated exposure is not supported by the supplied evidence.
Exploitation context
The CVSS 4.0 score is 9.3, reflecting network reachability, low complexity, high privileges, no user interaction, and serious confidentiality and integrity consequences. The supplied record is not in KEV, and no cited evidence establishes active exploitation in the wild.
Researcher notes
The key control failure is inconsistent validation between callers: the HTTP handler was hardened previously, while the MCP path remained vulnerable. Validation should focus on whether database_clean accepts non-node identifiers and whether history contains unexpected files, without testing against sensitive production data. The sources do not describe persistence, code execution, or availability impact.
Mitigation direction
Upgrade SiYuan to version 3.7.4 or later.
Restrict MCP access to trusted clients and networks until upgrading.
Review and revoke unnecessary MCP credentials or permissions.
Check the vendor advisory for any additional deployment-specific guidance.
Validation and detection
Inventory SiYuan instances and confirm each version is 3.7.4 or later.
Determine whether MCP and the database_clean tool are enabled or reachable.
Review MCP authentication records for unexpected or compromised clients.
Inspect history storage for unusual copies of sensitive system or application files.
Investigate unexplained deletion of files readable by the SiYuan process.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-22: File access and web shell behavior lookup
File traversal and upload weaknesses can lead teams to review file, web shell, execution, and collection telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references file access or upload behavior, so file telemetry and web shell review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
3Timeline events
1ADP providers
3Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: pocAutomatable: noTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-22 · source CWE mapping
Improper Limitation of a Pathname to a Restricted Directory
Improper Limitation of a Pathname to a Restricted Directory represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.