SiYuan: getUniqueFilename passes an unvalidated client-supplied path to the filesystem, giving anonymous readers an existence oracle over the entire host filesystem
Published Aug 13, 2026 · Updated Oct 24, 2026 · Also known as GHSA-hf8h-97gm-4x2p
Original summary
Normalized public record · Updated Oct 24, 2026
SiYuan: getUniqueFilename passes an unvalidated client-supplied path to the filesystem, giving anonymous readers an existence oracle over the entire host filesystem
Publisher and source text is retained separately from QFinch interpretation.
QFinch assessment
/api/file/getUniqueFilename takes a path from the request body and passes it to a filesystem existence check with no validation, confinement or authorization. The response distinguishes paths that exist from paths that do not, so an anonymous reader in publish mode can probe arbitrary locations on the host, one request per probe. Files and directories both work. Every neighbouring file route either requires an administrator or confines the path first.
Potential impact
An anonymous reader in publish mode, or any publish RoleReader, determines whether arbitrary paths exist on the host. Because directories respond the same way as files, the filesystem can be walked rather than only guessed at. This supports identifying the operating-system user's home directory, detecting installed software, backup and synchronisation directories, mapping the workspace layout, and confirming the existence of specific documents by probing their storage paths. It also composes with the absolute workspace path returned elsewhere, which supplies a concrete prefix rather than requiring guesswork, and it recovers the operating-system username that the browser-request path strip added under issue 17410 was introduced to conceal. Scoped precisely: nothing is read and nothing is written. This is an existence and layout disclosure, valuable primarily as a reconnaissance step.
Technical context
Route. kernel/api/router.go:289 on master, :292 on the development branch, CheckAuth only. Handler, kernel/api/file.go:84, in full: The argument binder does no path handling. util.BindJsonArg (kernel/util/net.go:365) takes two booleans, required (the key must be present) and rejectEmpty (the value must be non-empty). That is its entire contract. There is no filepath.Clean, no workspace join, no traversal check. An absolute path outside the workspace reaches gulu.File.IsExist unmodified. The oracle. util/file.go:67: Input echoed back means the path does not exist. A (1) suffix means it does. The asymmetry. | Route | Middleware | |---|---| | putFile, copyFile, globalCopyFiles, workspaceCopyFiles, removeFile, renameFile | CheckAuth, CheckAdminRole, CheckReadonly | | readDir (directory enumeration) | CheckAuth, CheckAdminRole | | getFile | CheckAuth, but GetAbsPathInWorkspace returns 403 on escape, plus rejectEncryptedBoxPath and a publish-access check | | getUniqueFilename | CheckAuth, nothing else | getFile binds the identical BindJsonArg("path", &filePath, true, true) and confines it as its first action.
Evidence: public source recordsAffected products
| Affected package, product or range | Fix status |
|---|---|
| Consult the referenced vendor advisory for affected versions. | Consult source advisory |
Matching a version is only one part of assessing exposure. QFinch has not assessed your environment on this public page.
Remediation
Apply the vendor-supported fixed release or mitigation, then verify the affected component is no longer reachable.
- Confirm the affected product and reachable code path exist in your environment.
- Apply the vendor-supported patch or mitigation from the primary advisory.
- Rescan the exact deployed revision and retain verification evidence.
Evidence coverage
- SSVC priority
- LOW
- Confidence
- Not available
- Aliases
- GHSA-hf8h-97gm-4x2p
Scores appear only when corresponding evidence exists. Missing data is never interpreted as zero risk.
Sources and record history
Record history
Published Aug 13, 2026 · Last refreshed Oct 24, 2026