Authorization Bypass Through User-Controlled Key
CVE-2024-52294
Summary
Khoj is a self-hostable artificial intelligence app. In versions through 1.28.4.dev93, 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. Support for arbitrarily presenting an "email" for update has been deprecated.
- LOW
- NETWORK
- LOW
- UNCHANGED
- NONE
- LOW
- NONE
- NONE
CWE-639 - Authorization Bypass Through User-Controlled Key
The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.
References
Advisory Timeline
- Published