Skip to main content

khoj CVE-2026-13508

| EUVDEUVD-2026-40005 LOW
Improper Authorization (CWE-285)
2026-06-28 cna@vuldb.com GHSA-5f46-vq6x-rmc9
2.0
CVSS 4.0 · Vendor: vuldb

Severity by source

Vendor (vuldb) PRIMARY
2.0 MEDIUM
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
vuln.today AI
5.4 MEDIUM

Network-accessible, low-complexity; authenticated low-privileged user (PR:L) exploits missing authorization check with no victim interaction required; no availability impact observed.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (vuldb).

CVSS VectorVendor: vuldb

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
P
Scope
X

Lifecycle Timeline

2
Source Code Evidence Fetched
Jun 28, 2026 - 22:31 vuln.today
Analysis Generated
Jun 28, 2026 - 22:31 vuln.today

DescriptionCVE.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.

Share

CVE-2026-13508 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy