CVE-2026-13508

khoj-ai khoj Conversation Sharing api_chat.py authorization

Published Jun 28, 2026 CVSS 4.0 · 5.1 Medium EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The vulnerability resides in the Conversation Sharing Handler within the api_chat.py component of Khoj. It is a manifestation of CWE-285 (Broken Access Control) and CWE-863 (Privilege Escalation), where an attacker can manipulate the conversation.agent argument to bypass the intended authorization checks. This allows the API to expose or modify conversation data that the user should not have access to, enabling unauthorized access to privileged resources and potentially leading to data leakage or account compromise.

Affected Systems

The affected product is Khoj by khoj-ai. Versions up to 2.0.0-beta.28 contain the flaw. The relevant component is the Conversation Sharing API exposed via the api_chat.py router. No specific sub-versions beyond the mentioned latest beta are identified as affected.

Risk and Exploitability

The CVSS score of 5.1 indicates moderate severity, while no EPSS data and absence from KEV suggest it is not yet a widely targeted vulnerability. Nevertheless, the exploit is published and remote exploitation is possible, making it a realistic risk for exposed installations. Attackers can manipulate HTTP requests to the Conversation Sharing endpoint to gain excessive permissions, and the lack of an available patch at launch means remediation must wait for an official fix or manual mitigation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update Khoj to a version that includes the merged fix for conversation.agent authorization (e.g., after PR 1328 is merged).
  • If no update is available, restrict access to the Conversation Sharing API by requiring stricter authentication or IP whitelisting so that only trusted clients can reach the endpoint.
  • Track the project's issue tracker and pull request 1328 for a fix; consider applying a backport or manually patching the api_chat.py file to validate conversation.agent against the authenticated user.

Generated by OpenCVE AI on June 28, 2026 at 23:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Khoj
Khoj khoj
Vendors & Products Khoj
Khoj khoj
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title khoj-ai khoj Conversation Sharing api_chat.py authorization
First Time appeared Khoj-ai
Khoj-ai khoj
Weaknesses CWE-285
CWE-863
CPEs cpe:2.3:a:khoj-ai:khoj:*:*:*:*:*:*:*:*
Vendors & Products Khoj-ai
Khoj-ai khoj
References
Metrics cvssV2_0

{'score': 6.5, 'vector': 'AV:N/AC:L/Au:S/C:P/I:P/A:P/E:POC/RL:ND/RC:UR'}

cvssV3_0

{'score': 5.5, 'vector': 'CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L/E:P/RL:X/RC:R'}

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L/E:P/RL:X/RC:R'}

cvssV4_0

{'score': 5.1, 'vector': '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'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
VulDB
Published
Updated
Jun 29, 2026, 1:39 PM
Reserved
Jun 28, 2026, 6:21 AM
Status
Deferred
Published
Jun 28, 2026, 10:16 PM
Modified
Oct 25, 2026, 5:10 PM