Advisory

GHSA-564j-v29w-rqr6

Also known as: None

Summary

Khoj Open Redirect Vulnerability in Login Page

Details

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2024-07-08 14:57 UTC
Modified
2024-12-06 05:29 UTC

Affected packages and fixes

khoj-assistant

PyPI · All systems

Affected

  • introduced 0, fixed 1.14.0 (ecosystem)

Fixed versions

1.14.0

Fix

  • Fixed version 1.14.0
    pip install --upgrade khoj-assistant==1.14.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences