# GHSA-564j-v29w-rqr6: Khoj Open Redirect Vulnerability in Login Page

- Severity: Medium (CVSS:4.0, scored by GitHub) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:N/SI:H/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2024-07-08T14:57:43.000Z
- Modified: 2024-12-06T05:29:45.728Z
- Weaknesses: CWE-601

## Description

### Summary
An attacker can use the `next` parameter on the login page to redirect a victim to a malicious page, while masking this using a legit-looking `app.khoj.dev` url.
For example, `https://app.khoj.dev/login?next=//example.com` will redirect to the https://example.com page.

### Details
The problem seems to be in this method: https://github.com/khoj-ai/khoj/blob/2667ef45449eb408ce1d7c393be04845be31e15f/src/khoj/routers/auth.py#L95

### PoC
Open the `https://app.khoj.dev/login?next=//example.com` url in a Gecko-based browser (Firefox).

### Impact
The impact is low, and this could only be used in phishing attempts, but it's still a problem nonetheless.

(As written by GitHub Advisory Database.)

## Affected

- khoj-assistant (PyPI): before 1.14.0

## Every score

- GitHub: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/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:N/SI:H/SA:N`

## References

- <https://github.com/khoj-ai/khoj/security/advisories/GHSA-564j-v29w-rqr6> (web)
- <https://github.com/khoj-ai/khoj/commit/4daf16e5f916641304e11d56a6071ad365c21a18> (web)
- <https://github.com/khoj-ai/khoj> (package)
- <https://github.com/khoj-ai/khoj/blob/2667ef45449eb408ce1d7c393be04845be31e15f/src/khoj/routers/auth.py#L95> (web)

## Sources

- GitHub Advisory Database: [GHSA-564j-v29w-rqr6](https://github.com/advisories/GHSA-564j-v29w-rqr6), CC-BY-4.0, modified 2024-12-06

---

Page: https://cve.day/GHSA-564j-v29w-rqr6 · Whole record: https://cve.day/GHSA-564j-v29w-rqr6.json · Rebuilt by cve.day 2026-11-25T22:56:34.035Z
