Khoj — Prompt Injection (CVE-2024-25639)
Date: 2024-07
Affected: khoj/khoj
Attack vector: prompt-injection
Category: vulnerability-disclosure
Severity: Medium
CVE: CVE-2024-25639
CWE: CWE-77
CWE-79
CWE-80
CVSS: 5.9 (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L)

Khoj is an application that creates personal AI agents. The Khoj Obsidian, Desktop and Web clients inadequately sanitize the AI model's response and user inputs. This can trigger Cross Site Scripting (XSS) via Prompt Injection from untrusted documents either indexed by the user on Khoj or read by Khoj from the internet when the user invokes the /online command. This vulnerability is fixed in 1.13.0.


Mitigations:

Architectural layers (MAESTRO):