CVE-2025-69207 in khojinfo

Summary

by MITRE • 02/03/2026

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.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 02/27/2026

The vulnerability identified as CVE-2025-69207 affects Khoj, a self-hostable artificial intelligence application that enables users to integrate their Notion accounts for enhanced search capabilities. This issue represents a critical authorization flaw that enables attackers to hijack user Notion integrations through a specific implementation weakness in the OAuth callback mechanism. The vulnerability specifically impacts versions prior to 2.0.0-beta.23, where proper access control measures were not adequately implemented to validate user identities during the authentication flow. The flaw manifests as an insecure direct object reference vulnerability, where the system fails to validate that the OAuth flow was initiated by the user whose UUID is being processed.

The technical implementation of this vulnerability stems from improper state parameter handling within the Notion OAuth callback endpoint. When users initiate the OAuth flow to connect their Notion accounts, the system generates a state parameter that should contain a unique identifier for the user. However, the vulnerable implementation accepts any user UUID provided in the callback without verifying that the OAuth process was legitimately initiated by that particular user. This oversight allows attackers to manipulate the state parameter and substitute their own Notion configuration for any victim's account. The attack vector leverages the fact that user UUIDs can be obtained through shared conversations where AI-generated images are present, making the exploitation surface more accessible. This type of vulnerability aligns with CWE-284, which addresses improper access control in software systems, and represents a significant deviation from proper authentication flow validation.

The operational impact of this vulnerability extends beyond simple unauthorized access, creating substantial risks for data integrity and user privacy. When attackers successfully hijack a user's Notion integration, they can poison the search index that Khoj maintains, potentially injecting malicious content or altering search results in ways that could mislead users. This data poisoning capability undermines the trustworthiness of the search functionality and could be exploited for more sophisticated attacks such as social engineering or information manipulation. The unauthorized access to victims' search indexes represents a serious breach of user data privacy, as these indexes may contain sensitive personal information, work-related documents, and other confidential data that users expect to remain private. Furthermore, the attack requires minimal information gathering since UUIDs can be extracted from shared conversation contexts, making this vulnerability particularly dangerous as it can be exploited with relatively simple reconnaissance techniques.

The mitigation for this vulnerability requires implementing proper user identity validation within the OAuth callback endpoint. The fix implemented in version 2.0.0-beta.23 addresses the core issue by ensuring that the system verifies the OAuth flow was legitimately initiated by the user whose UUID is being processed. This validation mechanism should maintain state information throughout the OAuth process and confirm that the callback originates from the same user who initiated the authentication sequence. Security practitioners should implement proper session management and state validation to prevent unauthorized modifications to user configurations. The fix aligns with ATT&CK technique T1566, which covers social engineering attacks that can be facilitated by improper authentication handling, and demonstrates the importance of implementing robust access control measures in web applications. Organizations using Khoj should immediately upgrade to version 2.0.0-beta.23 or later to prevent exploitation of this vulnerability and ensure user data remains protected from unauthorized access and manipulation.

Responsible

GitHub M

Reservation

12/29/2025

Disclosure

02/03/2026

Moderation

accepted

CPE

ready

EPSS

0.00361

KEV

no

Activities

low

Sources

Do you need the next level of professionalism?

Upgrade your account now!