{"id":"GHSA-564j-v29w-rqr6","aliases":[],"url":"https://o3.security/vulnerability/GHSA-564j-v29w-rqr6","summary":"Khoj Open Redirect Vulnerability in Login Page","details":"### Summary\nAn 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.\nFor example, `https://app.khoj.dev/login?next=//example.com` will redirect to the https://example.com page.\n\n### Details\nThe problem seems to be in this method: https://github.com/khoj-ai/khoj/blob/2667ef45449eb408ce1d7c393be04845be31e15f/src/khoj/routers/auth.py#L95\n\n### PoC\nOpen the `https://app.khoj.dev/login?next=//example.com` url in a Gecko-based browser (Firefox).\n\n### Impact\nThe impact is low, and this could only be used in phishing attempts, but it's still a problem nonetheless.","published":"2024-07-08T14:57:43Z","modified":"2024-12-06T05:29:45.728140Z","cvss":{"score":6.5,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"PyPI","name":"khoj-assistant","fixedVersion":"1.14.0"}],"fix":{"url":"https://github.com/khoj-ai/khoj/commit/4daf16e5f916641304e11d56a6071ad365c21a18","label":"khoj-ai/khoj@4daf16e"},"references":[{"type":"WEB","url":"https://github.com/khoj-ai/khoj/security/advisories/GHSA-564j-v29w-rqr6"},{"type":"WEB","url":"https://github.com/khoj-ai/khoj/commit/4daf16e5f916641304e11d56a6071ad365c21a18"},{"type":"PACKAGE","url":"https://github.com/khoj-ai/khoj"},{"type":"WEB","url":"https://github.com/khoj-ai/khoj/blob/2667ef45449eb408ce1d7c393be04845be31e15f/src/khoj/routers/auth.py#L95"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2024-12-06T05:29:45.728140Z"}}