Lack of data validation - Path Traversal In github.com/siyuan-note/siyuan/kernel

Description

SiYuan has directory traversal within its publishing service

Details

The /api/file/readDir interface was used to traverse and retrieve the file names of all documents under a notebook.

PoC

#!/usr/bin/env python3
"""POC: SiYuan /api/file/readDir 未鉴权目录遍历"""
import requests, json, sys

def poc(target):
    base = target.rstrip("/")
    url = f"{base}/api/file/readDir"
...

Impact

Directory traversal vulnerability: The entire directory structure of a notebook could be obtained, and then a file reading vulnerability could be exploited to achieve arbitrary document reading.

资源文件夹

image

插件文件夹

image

conf文件夹

image

Mitigation

Update Impact

Minimal update. May introduce new vulnerabilities or breaking changes.

Ecosystem
Package
Affected version
FLAT-52B5Y – Vulnerability | Fluid Attacks Database