Skip to content
HighVulnerability

GHSA-62gx-5q78-wrvx: obsidian-local-rest-api: Authenticated path traversal via URL-encoded %2F in /vault/{path} — arbitrary host file read/write/delete

Published
Record updated
View JSON
Affected
  • obsidian-local-rest-api < 4.1.3
Fixed in
No fixed version was stated when the source was last read.

Summary

The obsidian-local-rest-api plugin's /vault/{path} endpoints (GET, PUT, PATCH, POST, DELETE) decode the request path with decodeURIComponent after Express routing, with no confinement check. An authenticated client can send ..%2F..%2F sequences to escape the vault and read, write, or delete arbitrary files with the Obsidian process's privileges. The advisory notes that MCP and LLM-agent deployments make this easier to reach through prompt injection in vault content.

Mitigation

The source recommends applying the same posix.resolve(syntheticRoot, ...) and startsWith confinement check that vaultMove already uses to the decoded path in every vault handler, and rejecting any segment that decodes to '..'.