CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-4WWP-F6GW-6QM5

GHSA-4WWP-F6GW-6QM5: Sensitive Information Disclosure via Incomplete Path Blocklist in SiYuan

Alon Barad
Alon Barad
Software Engineer

Oct 5, 2026·6 min read·18 visits

Executive Summary (TL;DR)

Authenticated users can bypass the path-guard system in SiYuan versions prior to v3.8.2 to extract raw TLS private keys and CA files, enabling traffic decryption or certificate spoofing.

An incomplete path blocklist in the file retrieval engine of the SiYuan knowledge management platform allows authenticated users to read TLS and CA private key materials directly from the configuration directory.

Vulnerability Overview

SiYuan is an open-source personal knowledge management platform designed to organize and synchronize markdown-formatted content. The core application exposes an HTTP API allowing users and integrated extensions to interact with the underlying database and file system. This architecture requires strict access control boundaries to prevent unauthorized directory traversal and direct retrieval of security-critical configuration files.

The file retrieval interface, specifically the /api/file/getFile endpoint, acts as a gateway for fetching system and workspace files. To secure this endpoint, the developers implemented a custom path-guard system intended to block access to sensitive data structures. This vulnerability arose from a logical deficiency within the path-guard implementation where the list of restricted files was constructed with an incomplete set of targets.

By exploiting this deficiency, an authenticated user or client possesses the capability to download raw cryptographic keys and CA certificates from the host system. The root cause lies in the application restricting access specifically to a singular configuration database file while neglecting other sensitive configuration material residing in the identical workspace directory.

Root Cause Analysis

The vulnerability is categorized as an incomplete blocklist (CWE-184) combined with path traversal limitations (CWE-22) leading to information exposure (CWE-200). Within the application backend, the file access operations are intercepted by the refuseToAccess helper function located in kernel/api/file.go. This function forwards the requested absolute file path to the IsForbiddenAbsPath validation routine in kernel/util/path_guard.go.

The IsForbiddenAbsPath routine was designed to normalize the requested path and compare it against critical application components. However, prior to version v3.8.2, the blocklist logic only checked for equality against the path of the main configuration file, conf/conf.json. No directory-level restrictions were established for the parent conf/ directory, allowing arbitrary file retrieval within that path if the file name did not match conf.json exactly.

During initial configuration, SiYuan generates and stores critical cryptographic assets within this exact conf/ directory. These assets include leaf TLS private keys, public leaf certificates, root CA certificates, and root CA private keys. Because these filenames were omitted from the explicit blocklist, the guard evaluated paths targeting these key files as safe, resulting in raw private key exposure.

Code Analysis

To understand the exact code-level flaw, analyze the differences in kernel/util/path_guard.go before and after the patch. In the vulnerable implementation, the system verified the path using the following block:

// Vulnerable Code
func IsForbiddenAbsPath(abs string) bool {
    fileNorm := NormalizeAndResolve(abs)
 
    // Only forbidden configuration file conf/conf.json is blocked:
    confPath := NormalizeAndResolve(filepath.Join(ConfDir, "conf.json"))
    if fileNorm == confPath {
        return true
    }
 
    // ... (Template and snippet checks continue)
}

In this implementation, the filepath.Join(ConfDir, "conf.json") call creates a single static path. If an attacker queries a different file in the configuration directory, such as key.pem, the comparison fileNorm == confPath returns false.

To remediate this, the developer refactored the verification check to iterate over an explicit array of forbidden configuration files. The updated codebase in version v3.8.2 implements the path check with the following logic:

// Patched Code in v3.8.2
func IsForbiddenAbsPath(abs string) bool {
    fileNorm := NormalizeAndResolve(abs)
 
    // Block sensitive files under conf/ folder
    forbiddenConfFiles := []string{
        "conf.json",
        TLSCACertFilename, // Defined as "ca.key" / "ca.pem"
        TLSCAKeyFilename,
        TLSCertFilename,
        TLSKeyFilename,
    }
    for _, filename := range forbiddenConfFiles {
        if fileNorm == NormalizeAndResolve(filepath.Join(ConfDir, filename)) {
            return true
        }
    }
    // ...
}

This iterative validation evaluates each key constant, resolving the absolute path of every cryptographic asset to confirm whether the requested file matches any blocked item.

Exploitation Methodology

Exploitation of this vulnerability requires administrative or authenticated API access to the SiYuan local web interface. An attacker who has acquired the kernel authorization token can execute HTTP POST requests directed at /api/file/getFile to retrieve files.

The targeted paths are resolved using standard platform conventions, making the location of cryptographic files highly predictable. The attacker crafts a request payload containing the specific path of the private key relative to the workspace, such as /conf/key.pem or /conf/ca.key.

POST /api/file/getFile HTTP/1.1
Host: localhost:6806
Authorization: Token [API_TOKEN]
Content-Type: application/json
 
{
  "path": "/conf/key.pem"
}

The path-guard normalization function resolves the input to its canonical absolute filesystem representation. Because the requested file path does not match /conf/conf.json, the blocklist routine returns false. The server then reads the raw PEM-formatted private key from the filesystem and responds with the raw content in the JSON response payload.

Below is a flowchart representing this validation bypass path:

Impact Assessment

The security impact of retrieving raw private cryptographic keys is severe and directly compromises the integrity of transport security. In typical deployments, SiYuan utilizes TLS to protect transit data, sync structures, and authorize API clients securely. Compromising the leaf private key allows an attacker with network access to decrypt local or remote session traffic silently.

If the CA private key is obtained, the attacker can sign arbitrary SSL certificates. This allows the attacker to conduct Man-in-the-Middle (MitM) attacks against clients connecting to the platform, capturing passwords, active session cookies, or subsequent synchronization data.

The vulnerability holds a high severity rating because the exposure of core cryptographic secrets is irreversible without a manual certificate and key rotation sequence.

Security Patch Evaluation and Bypass Risks

The patch implemented in version v3.8.2 restricts direct retrieval of the TLS certificates and key files by expanding the validation to cover defined constants. However, several minor implementation weaknesses exist. First, because the blocklist is file-specific rather than directory-specific, any newly added sensitive file inside the /conf/ directory in future updates will remain vulnerable until manually added to the blocklist array.

Second, validation bypass risks related to operating system specifics must be considered. On Windows systems where the 8.3 short filename generation (SFN) is enabled, files may be mapped to truncated names such as CONF~1/KEY~1.PEM. If the canonicalization helper NormalizeAndResolve does not call operating system-level APIs to expand 8.3 short paths, bypass opportunities remain.

A more robust architectural solution would involve directory-level blocking, preventing access to the entire conf/ hierarchy by default rather than relying on list enumeration.

Fix Analysis (1)

Technical Appendix

CVSS Score
7.7/ 10

Affected Systems

SiYuan Knowledge Management Platform

Affected Versions Detail

Product
Affected Versions
Fixed Version
SiYuan
siyuan-note
< v3.8.2v3.8.2
AttributeDetail
CWE IDCWE-184 (Incomplete List of Disallowed Input Values)
Attack VectorNetwork (Authenticated API call)
CVSS Score7.7
Exploit Statuspoc
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1552Unsecured Credentials
Credential Access
CWE-184
Incomplete List of Disallowed Input Values

References & Sources

  • [1]SiYuan Security Advisory GHSA-4wwp-f6gw-6qm5
  • [2]Security Fix Commit

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•37 minutes ago•CVE-2026-126297
7.5

CVE-2026-126297: Algorithmic Complexity Denial of Service in NLTK ConllCorpusReader

CVE-2026-126297 (GHSA-v8f3-6phw-6mh9) is an uncontrolled resource consumption and algorithmic complexity vulnerability in the Natural Language Toolkit (NLTK) prior to version 3.10.4. Located in the Semantic Role Labeling (SRL) parser within `nltk/corpus/reader/conll.py`, the flaw allows an attacker to trigger quadratic O(N^2) CPU processing overhead by providing crafted CoNLL-formatted corpus inputs containing decoy span columns or nested full-width verb spans. Applications parsing untrusted linguistic corpora can experience prolonged CPU exhaustion and application-level Denial of Service (DoS).

Amit Schendel
Amit Schendel
1 views•12 min read
•about 2 hours ago•CVE-2026-126298
7.5

CVE-2026-126298: Quadratic Algorithmic Complexity Denial of Service in NLTK Tree.chomsky_normal_form

CVE-2026-126298 (also tracked as GHSA-r53h-rw34-8h97) is an algorithmic complexity Denial of Service (DoS) vulnerability in the Natural Language Toolkit (NLTK) Python library affecting all versions prior to 3.10.4. The vulnerability resides in the nltk.tree.transforms.chomsky_normal_form function and its corresponding public method Tree.chomsky_normal_form(). When transforming a parse tree into Chomsky Normal Form using the default right-factoring strategy, the function repeatedly invokes list.pop(0) inside a loop iterating over all children of a node. In CPython, removing the initial element of a standard list requires an O(N) memory shift operation, causing the overall binarization algorithm to degrade to O(N^2) quadratic time complexity relative to the width of a node. Furthermore, converting horizontal node width into vertical tree depth bypasses initial parsing depth bounds, triggering subsequent stack exhaustion (RecursionError) when recursive methods traverse the mutated structure. Unauthenticated remote attackers who can submit bracketed tree strings to applications invoking this transformation can exhaust single-threaded CPU resources or induce unhandled application exceptions.

Alon Barad
Alon Barad
3 views•12 min read
•about 3 hours ago•CVE-2026-126299
7.5

CVE-2026-126299: Quadratic Algorithmic Complexity Denial of Service in NLTK CCG Lexicon Parser

An algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) before version 3.10.4 allows remote unauthenticated attackers to cause a denial of service via crafted Combinatory Categorial Grammar (CCG) lexicon strings. The parser in nltk.ccg.lexicon.fromstring performs repeated immutable string slicing, concatenation, and regex tail capturing, resulting in O(n^2) CPU consumption when processing wide, flat category definitions.

Alon Barad
Alon Barad
4 views•10 min read
•about 4 hours ago•CVE-2026-126295
7.1

CVE-2026-126295: Path Traversal and Unconfined File Access in NLTK BllipParser

CVE-2026-126295 (also tracked as GHSA-fg9w-wfp5-j933) is a path confinement bypass vulnerability in the Natural Language Toolkit (NLTK) affecting versions 3.10.0 prior to 3.10.4. The flaw resides in nltk/parse/bllip.py within the BllipParser class and its factory method BllipParser.from_unified_model_dir(). Unlike sibling tool wrappers in NLTK that enforce data-root confinement via the nltk.pathsec module, BllipParser passes caller-supplied filesystem paths directly into the third-party bllipparser native C extension without validation. When an application passes untrusted input as model paths or directories to BllipParser, an attacker can force the native extension to open arbitrary files on the local filesystem. This leads to information disclosure through parser diagnostic oracles, local model tampering via shared directories, and denial of service by hanging worker threads on blocking special files (such as FIFOs or device nodes) or exhausting memory via oversized files.

Amit Schendel
Amit Schendel
2 views•11 min read
•about 5 hours ago•CVE-2026-126300
5.3

CVE-2026-126300: Algorithmic Complexity Denial of Service in NLTK TreebankWordTokenizer.span_tokenize

CVE-2026-126300 (GHSA-ffr9-mgrr-wcvr) is an inefficient algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) Python library affecting versions 3.2.5 prior to 3.10.4. The flaw resides in the quote-restoration routine of TreebankWordTokenizer.span_tokenize and NLTKWordTokenizer.span_tokenize, where repeated calls to list.pop(0) over matched quote tokens introduce quadratic O(n^2) time complexity. An unauthenticated remote attacker who supplies input containing long sequences of double-quote characters can exhaust CPU resources and degrade service availability.

Amit Schendel
Amit Schendel
3 views•10 min read
•about 6 hours ago•GHSA-GPWC-27CW-RH9R
5.3

CVE-2026-126301: Quadratic CPU Exhaustion in NLTK LegalitySyllableTokenizer

The Natural Language Toolkit (NLTK) versions 3.6 through 3.10.3 contain an algorithmic complexity vulnerability in the LegalitySyllableTokenizer.tokenize method. When processing tokens composed of continuous runs of vowels, an unguarded string reversal and set membership lookup loop executes in quadratic time relative to the input token length. Remote attackers capable of submitting arbitrary text to applications utilizing this tokenizer can trigger sustained single-core CPU exhaustion and application-level denial of service.

Amit Schendel
Amit Schendel
5 views•10 min read