T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/run_pipeline.py:62- Finding
Arbitrary File Disclosure and Deletion Through Unrestricted Inbox Paths
- Content
View full analysis
ProcessedNote: raw = RawInboxItem( file_path=file_path, raw_content=file_path.read_text(encoding="utf-8"), detected_at=datetime.now(timezone.utc), ) synthesized = self.synthesizer.synthesize(raw) if title_override: synthesized.title = title_override.strip() synthesized.markdown_body = self._override_h1(synthesized.markdown_body, synthesized.title) architected = self.architect.architect(synthesized, raw.raw_content) final_path = self.file_manager.write_note(architected, synthesized) self.vault_index.add_concept(synthesized.title, []) if not keep_inbox: self.file_manager.remove_inbox_file(file_path) ``` ```python # scripts/file_manager.py:41-45 @staticmethod def remove_inbox_file(path: Path) -> None: try: path.unlink() except FileNotFoundError: return ``` ### Technical Analysis The documented purpose of `--inbox-file` is to process a file already staged inside the configured Obsidian inbox. The implementation resolves the supplied path but never verifies that it is located under `settings.inbox_path`. The pipeline consequently accepts any filesystem path readable by the process. It reads the complete file, sends its content through the Gemini synthesis and metadata pipeline, writes a derived copy into the vault, and then deletes the original file unless `--keep-inbox` is specified. Calling `Path.resolve()` normalizes ...[truncated 1370 chars]- Remediation
View remediation
