CVE-2026-32938: Siyuan Html2blockdom Missing Admin Readonly Guards

The route POST /api/lute/html2BlockDOM is registered without model.CheckAdminRole and model.CheckReadonly middleware. The handler resolves file:// URIs in pasted HTML and copies the referenced local files into {DataDir}/assets/, so it must be restricted to admins. With only model.CheckAuth, a publish-service visitor can stage arbitrary readable files (e.g. /

Provally CuratedPublic repositoryHighHigh confidenceVerifiedApache-2.0Go
greprules fetch cve-2026-32938-siyuan-html2blockdom-missing-admin-readonly-guards --engine opengrep

Description

The route POST /api/lute/html2BlockDOM is registered without model.CheckAdminRole and model.CheckReadonly middleware. The handler resolves file:// URIs in pasted HTML and copies the referenced local files into {DataDir}/assets/, so it must be restricted to admins. With only model.CheckAuth, a publish-service visitor can stage arbitrary readable files (e.g. /