Executive brief
VectifyAI PageIndex, a tool used for indexing documents for AI-based reasoning, is vulnerable to a denial-of-service attack. By providing a specially crafted PDF with a large table of contents, an attacker can force the system into an infinite loop. This results in the application becoming unresponsive and can lead to significant financial costs due to exhausted AI API credits.
Technical details
An infinite loop vulnerability exists in the `toc_transformer` function within `pageindex/page_index.py`. The root cause is an unbounded `while` loop that attempts to reconstruct a hierarchical JSON Table of Contents using an LLM. When the LLM response is truncated due to length (finish_reason == 'length'), the code automatically retries without an iteration limit or exit condition. A remote, unauthenticated attacker can exploit this by submitting a PDF with an excessively long Table of Contents, causing the application to hang and continuously query the backend LLM API. This leads to 100% CPU utilization and rapid exhaustion of API billing credits.
Affected products
- VectifyAI PageIndex up to f50e52975313c6716c02b20a119577a1929decba
Timeline
- 2026-03-23: disclosed: Issue reported on GitHub repository
- 2026-05-11: advisory: CVE-2026-8318 published