CVE-2026-13508: Khoj-ai Khoj Incorrect Authorization in Conversation Sharing Handler

CVE-2026-13508 · Severity: medium · CVSS 5.5 · Published 2026-06-28

Khoj, an AI personal assistant and search tool, contains a security flaw in its conversation sharing feature. When a user shares or forks a chat, the system may incorrectly retain references to private AI agents that should not be accessible to the new user. This could allow an unauthorized person to interact with or gain information about private custom agents they do not own.

Quick answers

Is CVE-2026-13508 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-13508 being exploited in the wild.
How severe is CVE-2026-13508?
Medium severity, with a CVSS score of 5.5, published 28 June 2026.
Which products and versions are affected?
Khoj AI Khoj up to 2.0.0-beta.28.
Is there a fix for CVE-2026-13508?
A patch was published on 2026-05-27: Pull request 1328 submitted to fix the issue Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-13508 attacked?
It is attacked over the network, in a network appliance.
Am I affected by CVE-2026-13508?
Check whether you run Khoj AI Khoj at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

An improper authorization vulnerability (CWE-863/CWE-285) exists in the Conversation Sharing Handler of Khoj-ai Khoj. The flaw is located in `src/khoj/routers/api_chat.py` and stems from the application failing to properly re-authorize or strip private agent references when a conversation is forked or shared. A remote authenticated attacker can exploit this by manipulating the `conversation.agent` argument, potentially gaining unauthorized access to private or protected agent configurations during chat execution, prompt construction, or model selection. A pull request (#1328) has been submitted to address the issue by enforcing re-authorization of inherited agents before execution.

Affected products

  • khoj-ai khoj up to 2.0.0-beta.28

Timeline

  • 2026-05-27: patched: Pull request 1328 submitted to fix the issue
  • 2026-06-28: disclosed: CVE-2026-13508 published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.