Skip to content
MediumVulnerability

GHSA-hq4h-w933-jm6c: khoj has an IDOR in subscription management allows unauthorized subscription modifications

Published
Record updated
View JSON
Affected
  • khoj < 1.29.0
Fixed in
1.29.0
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.4%Estimated probability that this CVE is exploited in the next 30 days, from the FIRST Exploit Prediction Scoring System. Read on .

Summary

An IDOR flaw in the update_subscription endpoint at /api/subscription lets any authenticated user cancel another user's Stripe subscription by supplying that user's email in the request. The handler looks up the customer by the email parameter and never checks that the caller owns the subscription. The impact is revenue loss from mass cancellations and loss of customer trust.

Mitigation

This was fixed in commit https://github.com/khoj-ai/khoj/commit/47d3c8c23597900af708bdc60aced3ae5d2064c1, which limited subscription update operations to the authenticated user. Support for arbitrarily presenting an email for update has been deprecated.