Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Network-accessible, low-complexity; authenticated low-privileged user (PR:L) exploits missing authorization check with no victim interaction required; no availability impact observed.
Primary rating from Vendor (vuldb).
CVSS VectorVendor: vuldb
Lifecycle Timeline
2DescriptionCVE.org
A flaw has been found in khoj-ai khoj up to 2.0.0-beta.28. This impacts an unknown function of the file src/khoj/routers/api_chat.py of the component Conversation Sharing Handler. This manipulation of the argument conversation.agent causes incorrect authorization. Remote exploitation of the attack is possible. The exploit has been published and may be used. The pull request to fix this issue awaits acceptance.
AnalysisAI
Incorrect authorization in khoj's Conversation Sharing Handler exposes private agent configurations to authenticated low-privileged users in versions up to 2.0.0-beta.28. The conversation.agent parameter is passed through shared conversation copy paths in src/khoj/routers/api_chat.py without verifying the requesting user's permission to access that agent, allowing leakage of private agent personality instructions and system prompts across trust boundaries. A proof-of-concept has been published (CVSS 4.0 E:P); the vulnerability is not in CISA KEV, and no officially released patch version has been confirmed.
Technical ContextAI
khoj is an open-source Django-based AI personal assistant that supports user-defined 'agents' - AI personas with configurable personality instructions and tiered privacy levels (PUBLIC, PROTECTED, PRIVATE). The vulnerable component is the Conversation Sharing Handler in src/khoj/routers/api_chat.py (CWE-285: Improper Authorization). The root cause is that when creating a public copy of a conversation via create_conversation_from_public_conversation, and when resolving agents during chat generation in helpers.py and api_chat.py, the code passed conversation.agent directly into the resulting context without re-validating whether the requesting user holds permission to use that specific agent. The PR #1328 diff confirms three distinct code paths lacked authorization guards: the conversation copy constructor, the synchronous chat response path, and the async agenerate_chat_response helper. The fix introduces get_agent_accessible_to_user_or_default and its async variant to enforce privacy-level checks (PUBLIC passthrough, creator match, PROTECTED passthrough, else fallback to default agent) at each of these call sites.
RemediationAI
No officially released patched version has been confirmed at time of analysis. The upstream fix is available as a pending pull request at https://github.com/khoj-ai/khoj/pull/1328 which has not yet been merged into a tagged release. Operators should monitor https://github.com/khoj-ai/khoj/ for a release incorporating PR #1328 and upgrade immediately upon availability. For deployments that cannot wait, the most effective compensating control is to disable or restrict access to the conversation sharing feature so no shareable conversation links can be created that reference private agents - this eliminates the exploitable attack surface entirely. Alternatively, restrict the khoj instance to a fully trusted user population, removing the cross-user trust boundary the vulnerability depends on. Single-user self-hosted deployments require no immediate action. Applying the PR diff manually is technically feasible but introduces maintenance risk until an official release merges the change.
Same weakness CWE-285 – Improper Authorization
View allSame technique Authentication Bypass
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-40005
GHSA-5f46-vq6x-rmc9