Executive brief
grepai, a tool used for indexing and searching codebases using AI, is vulnerable to data corruption when multiple projects share the same database backend. Because the system does not uniquely distinguish between files with the same name across different projects, an attacker or a secondary project could accidentally or intentionally overwrite existing search data. This results in "index poisoning," where search results for one project may return incorrect or malicious information from another.
Technical details
A vulnerability exists in grepai's indexer/chunker.go where chunk IDs are generated using only the relative file path and chunk index (e.g., 'README.md_0'). When using a shared Qdrant collection across multiple projects, this lack of namespacing causes ID collisions. An attacker with the ability to index a project into the shared backend can trigger an 'upsert' that overwrites existing vectors from a different project. This leads to cross-project vector index poisoning and integrity loss. A pull request (#248) has been submitted to introduce project-based namespacing for point IDs and filters.
Affected products
- yoanbernabeu grepai <= 0.35.0
Timeline
- 2026-05-20: disclosed: Issue and fix PR submitted to GitHub repository
- 2026-06-08: advisory: Published to GitHub Advisory Database and NVD