CVE-2026-60084 exposes an endpoint in SiYuan called removeTemplate that directly passes user input to os.RemoveAll without any path validation or scope enforcement. The endpoint requires admin authentication, but that authentication was treated as a substitute for input validation rather than a complement to it—the classic failure pattern where developers trust privileged users not to misuse APIs and stop building safeguards into the API itself.
The deeper failure is contextual. SiYuan began as a local-first note-taking tool, and this endpoint was likely an internal convenience function written for programmatic cleanup of template files. The developers probably never imagined that path would come from an external caller, because in their mental model, only the application itself would invoke it. When SiYuan later added network-facing API capabilities, this internal helper became remotely reachable without any corresponding security audit of which filesystem operations were now exposed. This is "context collapse": code written under implicit environmental assumptions that no longer hold when the deployment model changes.
The vulnerability also reflects a recurring pattern in Go web applications. Go's standard library makes os.RemoveAll trivially accessible with no friction—no scaffolding, no "are you sure" prompts, no visible cost to the caller. This simplicity is celebrated as a language philosophy, but it migrates complexity to the application layer, where every developer must independently rediscover that passing user-supplied paths to deletion primitives requires scoping. The same pattern has appeared in PHP, Python, and Node.js ecosystems; Go's "trust the programmer" ethos means the lesson must be relearned in every new codebase rather than encoded in tooling.
The permission model compounds the problem. When "admin" was later defined in SiYuan's authorization layer, there was no document specifying that removeTemplate was scoped to the data directory, so the scope wasn't inherited—it defaulted to the filesystem. The endpoint was never recognized as an API requiring a security contract; it accumulated implied authority through familiarity until network exposure revealed the gap.
For defenders: audit every internal helper that touches the filesystem and ask whether it would be safe if called with arbitrary user input. Implement explicit path scoping for any deletion operation—verify paths are within expected directories before passing them to os.RemoveAll. Review the application's threat model whenever the deployment context shifts from local-only to network-accessible, because that's when assumptions about caller identity break down.