{"answers":{"affected":"It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-25639 exists.","fix":"No fix has been published for CVE-2024-25639 yet. Limit exposure of the affected software until one is available.","what":"CVE-2024-25639 is a medium-severity cross-site scripting vulnerability in khoj-ai khoj, published on 8 Jul 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-25639 and fix it if it is affected.\n\nWhat it is: CVE-2024-25639 is a medium-severity cross-site scripting vulnerability in khoj-ai khoj, published on 8 Jul 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-25639 exists.\n\nAffected product: khoj-ai khoj. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-25639/ (Markdown: https://insights.sbomify.com/CVE-2024-25639/index.md)","id":"CVE-2024-25639","markdown":"https://insights.sbomify.com/CVE-2024-25639/index.md","name":"CVE-2024-25639","record":{"aliases":["GHSA-h2q2-vch3-72qm"],"analysis":{"component_type":"desktop_application","fix_type":"upgrade","impacts":["code_execution","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"AI agent application","requires_auth":"none","summary":"Attackers can execute arbitrary scripts in Khoj clients via prompt injection from untrusted documents or online content.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"khoj","vendor":"khoj"}],"cvss":{"score":5.9,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"},{"id":"CWE-80","name":"Improper Neutralization of Script-Related HTML Tags in a Web Page"}],"description":"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.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":false,"headline":"Prompt Injection triggered XSS vulnerability in Khoj Obsidian, Desktop and Web clients","id":"CVE-2024-25639","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"xss","year":"2024"},"n_packages":0,"n_references":2,"next":{"headline":"Improper Neutralization of Alternate XSS Syntax in iris-web","id":"CVE-2024-25640"},"packages":[],"prev":{"headline":"DNSJava DNSSEC Bypass","id":"CVE-2024-25638"},"products":["khoj"],"published":"2024-07-08","related":[{"cvss_score":5.4,"headline":"Khoj has an IDOR in Notion OAuth Flow Enables Index Poisoning","id":"CVE-2025-69207","kev_date_added":null,"published":"2026-02-02"},{"cvss_score":5.4,"headline":"Khoj Vulnerable to Stored Cross-site Scripting In Automate (Preview feature)","id":"CVE-2024-43396","kev_date_added":null,"published":"2024-08-20"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-08-01","vendors":["khoj-ai"]},"summary":"Attackers can execute arbitrary scripts in Khoj clients via prompt injection from untrusted documents or online content.","url":"https://insights.sbomify.com/CVE-2024-25639/"}