Skip to content
OpenAdvisories
Medium · 4.3 CVE-2024-52294 EUVD-2024-3591GHSA-hq4h-w933-jm6cPYSEC-2026-1493

khoj has an IDOR in subscription management that allows unauthorized subscription modifications

Published Dec 30, 2024 · Updated Dec 30, 2024 · Assigned by GitHub_M

Description

Khoj is a self-hostable artificial intelligence app. Prior to version 1.29.10, an Insecure Direct Object Reference (IDOR) vulnerability in the update_subscription endpoint allows any authenticated user to manipulate other users' Stripe subscriptions by simply modifying the email parameter in the request. The vulnerability exists in the subscription endpoint at `/api/subscription`. The endpoint uses an email parameter as a direct reference to user subscriptions without verifying object ownership. While authentication is required, there is no authorization check to verify if the authenticated user owns the referenced subscription. The issue was fixed in version 1.29.10. Support for arbitrarily presenting an email for update has been deprecated.

Affected products

VendorProductAffectedFixed
khoj-ai khoj < 1.29.0 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI khoj < 1.29.0 1.29.0 GHSA-hq4h-w933-jm6c

References