# CVE-2024-43396: Khoj Vulnerable to Stored Cross-site Scripting In Automate (Preview feature)

- Severity: Medium 5.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.55%, higher than 47% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-08-20T19:59:32.000Z
- Modified: 2026-07-07T17:56:50.241Z
- Also known as: GHSA-cf72-vg59-4j4h, PYSEC-2026-1492
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

Khoj is an application that creates personal AI agents. The Automation feature allows a user to insert arbitrary HTML inside the task instructions, resulting in a Stored XSS. The q parameter for the /api/automation endpoint does not get correctly sanitized when rendered on the page, resulting in the ability of users to inject arbitrary HTML/JS. This vulnerability is fixed in 1.15.0.

(As written by CVE List.)

## Affected

- khoj-ai khoj: < 1.15.0
- khoj (PyPI): before 1.15.0
- khoj khoj: before 1.15.0

## Every score

- GitHub_M: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N`
- GitHub: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`
- NVD: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- PyPA Advisory Database: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N`
- PyPA Advisory Database: CVSS:4.0 `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`

## References

- <https://github.com/khoj-ai/khoj/security/advisories/GHSA-cf72-vg59-4j4h> (exploit, vendor-advisory, web)
- <https://github.com/khoj-ai/khoj/commit/1c7a562880eeb7354325545d2cf6c5d1d1134812> (patch, web)
- <https://github.com/khoj-ai/khoj/commit/55be90cdd2f9d6a09c8bf9ceea52fc36b9201626> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-43396> (advisory)
- <https://github.com/khoj-ai/khoj> (package)
- <https://pypi.org/project/khoj> (package)
- <https://github.com/advisories/GHSA-cf72-vg59-4j4h> (advisory)

## Sources

- CVE List: [CVE-2024-43396](https://www.cve.org/CVERecord?id=CVE-2024-43396), CVE Terms of Use, modified 2024-08-21
- GitHub Advisory Database: [GHSA-cf72-vg59-4j4h](https://github.com/advisories/GHSA-cf72-vg59-4j4h), CC-BY-4.0, modified 2026-07-07
- NVD: [CVE-2024-43396](https://nvd.nist.gov/vuln/detail/CVE-2024-43396), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-1492](https://osv.dev/vulnerability/PYSEC-2026-1492), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2024-43396 · Whole record: https://cve.day/CVE-2024-43396.json · Rebuilt by cve.day 2026-11-25T22:58:44.600Z
