LlamaIndex is vulnerable to Path Traversal attack through its ObsidianReader class
The ObsidianReader class in LlamaIndex fails to resolve symbolic links and does not check that resolved paths stay inside the vault directory. An attacker who can place a symlink in the vault can cause files outside the vault to be read and processed as Markdown, exposing sensitive information.
run-llama/llama_index
Originally disclosed on huntr
A vulnerability in the ObsidianReader class in LlamaIndex Readers Integration: Obsidian before version 0.5.1 from the run-llama/llama_index repository (versions 0.12.23 to 0.12.28) allows for arbitrary file read through symbolic links. The ObsidianReader fails to resolve symlinks to their real paths and does not validate whether the resolved paths lie within the intended directory. This flaw enables attackers to place symlinks pointing to files outside the vault directory, which are then processed as valid Markdown files, potentially exposing sensitive information.
From the GitHub Advisory Database (GHSA-fmrf-6jv9-qjc7, CC BY 4.0).
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The reader does not resolve symlinks to their real paths and does not verify that the resolved path remains within the intended vault directory.
Impact
An attacker could read arbitrary files outside the vault, potentially exposing sensitive information.
What the attacker needed
Ability to place a symlink in the vault
The fix
The issue was fixed in version 0.5.1 of the Obsidian reader integration.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A symbolic link is a shortcut file that points to another file elsewhere on the disk. The Obsidian reader was meant to read only notes inside a chosen folder, but it followed these shortcuts without checking where they led. So someone who could add a shortcut into that folder could make the tool read private files from other parts of the system.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.