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

> Attackers can hijack Notion integrations and poison search indexes by exploiting an IDOR in the OAuth callback, requiring user UUID knowledge.

- **Severity:** Medium 5.4 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** No
- **Published:** 2 Feb 2026
- **Updated:** 3 Feb 2026
- **Also known as:** GHSA-6whj-7qmg-86qj, PYSEC-2026-1491

## What is CVE-2025-69207?

CVE-2025-69207 is a medium-severity authentication bypass vulnerability in khoj-ai khoj, published on 2 Feb 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official 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.

Weakness: CWE-639 (Authorization Bypass Through User-Controlled Key)

## Which versions are affected by CVE-2025-69207?

3 open source packages ship an affected version, including khoj. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `khoj` | PyPI | All versions to 2.0.0b25.dev3 | None |
| `khoj` | PyPI | All versions to 2.0.0b25.dev3 | None |
| `khoj` | PyPI | All versions to 2.0.0b25.dev3 | None |

Products: Khoj Khoj.

## How do I fix CVE-2025-69207?

No fix has been published for CVE-2025-69207 yet. Limit exposure of the affected software until one is available.

## Is CVE-2025-69207 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-69207 exists.

## Other vulnerabilities in khoj-ai khoj

- [CVE-2024-25639](https://insights.sbomify.com/CVE-2024-25639/): Prompt Injection triggered XSS vulnerability in Khoj Obsidian, Desktop and Web clients (medium 5.9)
- [CVE-2024-43396](https://insights.sbomify.com/CVE-2024-43396/): Khoj Vulnerable to Stored Cross-site Scripting In Automate (Preview feature) (medium 5.4)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-69207 and fix it if it is affected.

What it is: CVE-2025-69207 is a medium-severity authentication bypass vulnerability in khoj-ai khoj, published on 2 Feb 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-69207 exists.

Affected packages and fixed versions:
- khoj (PyPI): affected all versions up to 2.0.0b25.dev3; no fix listed
- khoj (PyPI): affected all versions up to 2.0.0b25.dev3; no fix listed
- khoj (PyPI): affected all versions up to 2.0.0b25.dev3; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-69207/ (Markdown: https://insights.sbomify.com/CVE-2025-69207/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-69207
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-69207
- OSV: https://osv.dev/vulnerability/CVE-2025-69207

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-69207/
Summaries are generated and may contain mistakes; the official description above is the record.
