{"answers":{"affected":"2 open source packages ship an affected version, including khoj-assistant.","exploited":"There is no known exploitation of GHSA-564j-v29w-rqr6 in the wild and no public exploit code.","fix":"Upgrade khoj-assistant to 1.14.0 or later.","what":"GHSA-564j-v29w-rqr6 is a vulnerability in khoj-assistant, 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 GHSA-564j-v29w-rqr6 and fix it if it is affected.\n\nWhat it is: GHSA-564j-v29w-rqr6 is a vulnerability in khoj-assistant, 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: There is no known exploitation of GHSA-564j-v29w-rqr6 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- khoj-assistant (PyPI): affected all versions; fixed in 1.14.0\n- khoj-assistant (PyPI): affected all versions; fixed in 1.14.0\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/GHSA-564j-v29w-rqr6/ (Markdown: https://insights.sbomify.com/GHSA-564j-v29w-rqr6/index.md)","id":"GHSA-564j-v29w-rqr6","markdown":"https://insights.sbomify.com/GHSA-564j-v29w-rqr6/index.md","name":"GHSA-564j-v29w-rqr6","record":{"aliases":[],"analysis":{"component_type":"web_application","fix_type":"patch","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Khoj AI web app","requires_auth":"none","summary":"Attackers can redirect users to malicious sites via the login page's next parameter, facilitating phishing attacks against Khoj users.","user_interaction":"required","vuln_class":"open_redirect"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### 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.","ecosystems":["PyPI"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Khoj Open Redirect Vulnerability in Login Page","id":"GHSA-564j-v29w-rqr6","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"open_redirect","year":"2024"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"PyPI","fixed":["1.14.0"],"introduced":["0"],"last_affected":[],"package":"khoj-assistant","purl":null,"source":"GHSA-564j-v29w-rqr6"},{"ecosystem":"PyPI","fixed":["1.14.0"],"introduced":["0"],"last_affected":[],"package":"khoj-assistant","purl":"pkg:pypi/khoj-assistant","source":"GHSA-564j-v29w-rqr6"}],"products":null,"published":"2024-07-08","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can redirect users to malicious sites via the login page's next parameter, facilitating phishing attacks against Khoj users.","url":"https://insights.sbomify.com/GHSA-564j-v29w-rqr6/"}