Vulnerabilities in pkg:pypi/khoj-assistant
PACKAGEGHSA-564j-v29w-rqr6 is a MODERATE (CVSS 6.5) khoj open redirect vulnerability vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Khoj assistant libraries in the PyPI ecosystem. The issue involves khoj open redirect vulnerability in login page. Remediation is available by upgrading affected packages to version 1.14.0.
pkg:pypi/khoj-assistant
Vulnerability advisories affecting package pkg:pypi/khoj-assistant. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-564j-v29w-rqr6 | - | MODERATE | Khoj Open Redirect Vulnerability in Login Page |
GHSA-564j-v29w-rqr6 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N).
How to Fix GHSA-564j-v29w-rqr6
To remediate this vulnerability, upgrade all affected Khoj assistant dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install khoj-assistant>=1.14.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show khoj-assistant
How to Check if You Are Affected
To determine whether your Python environment is affected by GHSA-564j-v29w-rqr6, inspect your installed packages using pip:
pip show khoj-assistant
Analyze the terminal output to locate any version of Khoj assistant in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.14.0), your application is affected.
Note: The pip show khoj-assistant command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Khoj assistant, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-564j-v29w-rqr6 Affected Khoj assistant Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
khoj-assistant
|
PyPI |
< 1.14.0
|
1.14.0
|
References
Frequently Asked Questions
What is GHSA-564j-v29w-rqr6?
Which Khoj assistant versions are affected?
What version fixes GHSA-564j-v29w-rqr6?
Is khoj-assistant affected?
What is the CVSS score of GHSA-564j-v29w-rqr6?
What CWE is associated with GHSA-564j-v29w-rqr6?
How can I check PyPI dependencies for GHSA-564j-v29w-rqr6?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-564j-v29w-rqr6",
"modified" : "2024-07-08T14:57:43Z",
"published" : "2024-07-08T14:57:43Z",
"aliases" : [ ],
"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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N"
}, {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "khoj-assistant"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.14.0"
} ]
} ]
} ],
"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"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-601" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-07-08T14:57:43Z",
"nvd_published_at" : null
}
}