SiYuan до версии 3.7.2 содержит уязвимость обхода пути в короткой ветке /export/temp/ обработчика serviceExport (kernel/server/serve.go). В отличие от основной ветки экспорта, эта ветвь объединяет необработанный, декодированный в процентах путь запроса с util.TempDir и обслуживает файл без проверок IsSubPath или IsSensitivePath, добавленных в более раннем усилении раскрытия экспорта (GHSA-6865-qjcf-286f). Аутентифицированный злоумышленник может отправлять последовательности обхода в процентном кодировании (например, /export/temp/%2e%2e/.../etc/passwd, где %2e%2e декодируется в '..') для чтения произвольных файлов за пределами TempDir, включая /etc/passwd, ключи SSH (~/.ssh/*) и файлы рабочего пространства SiYuan *.db и *.log, минуя защиту конфиденциальных файлов.
Показать оригинальное описание (EN)
SiYuan before v3.7.2 contains a path traversal vulnerability in the /export/temp/ short-circuit branch of the serveExport handler (kernel/server/serve.go). Unlike the main export branch, this branch joins the raw, percent-decoded request path with util.TempDir and serves the file without the IsSubPath or IsSensitivePath checks added in the earlier export-disclosure hardening (GHSA-6865-qjcf-286f). An authenticated attacker can send percent-encoded traversal sequences (e.g. /export/temp/%2e%2e/.../etc/passwd, where %2e%2e is decoded to '..') to read arbitrary files outside TempDir, including /etc/passwd, SSH keys (~/.ssh/*), and SiYuan workspace *.db and *.log files, bypassing the sensitive-file protection.
Характеристики атаки
Последствия
Строка CVSS v4.0