obsidian-local-rest-api: Authenticated path traversal via URL-encoded %2F in /vault/{path} — arbitrary host file
Affects obsidian-local-rest-apiSource GCVE Database
CVSS 8.8 High : upgrade to 4.1.3 soon.
Data as of 2 Nov 2026, 20:16 UTC
- Patch
- Available – fixed in 4.1.3
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HWhat to do
Upgrade obsidian-local-rest-api to 4.1.3.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmobsidian-local-rest-api | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
The vulnerability can be mitigated by applying a confinement check similar to the one used in the MOVE operation: use posix.resolve to resolve the decoded path against a synthetic root (/vault) and reject any path that escapes this root. Reject any path segments that decode to '..' or result in traversal outside the vault directory. If you cannot patch yet, users should restrict access to the Local REST API to trusted clients only and consider disabling it if not needed.
Description
The obsidian-local-rest-api has an authenticated path traversal vulnerability in its /vault/{path} endpoints (GET/PUT/PATCH/POST/DELETE). The API decodes URL-encoded path segments after Express routing, allowing encoded traversal sequences like %2F to bypass routing checks and access files outside the vault. This enables an authenticated user to read, write, or delete arbitrary files on the host with the privileges of the Obsidian process. The vulnerability arises because the decoded path is not confined to the vault root, unlike the MOVE operation which has proper path confinement.
References
- github.com/coddingtonbear/obsidian-local-rest-api/security/advisories/GHSA-62gx-5q78-wrvx (opens in a new tab)
- github.com/coddingtonbear/obsidian-local-rest-api (opens in a new tab)
- github.com/coddingtonbear/obsidian-local-rest-api/releases/tag/4.1.3 (opens in a new tab)
- github.com/coddingtonbear/obsidian-local-rest-api/commit/fdc97f9e652e0d38cb43911d31f827a12b248fc8 (opens in a new tab)