Summary
Several organization billing endpoints accept attacker-controlled Stripe identifiers (subscriptionId) without verifying that the identifier belongs to the authenticated user's organization. This allows an authenticated attacker to perform unauthorized Stripe subscription operations on other tenants. As a result, an authenticated user can manipulate the Stripe subscription of another organization by supplying a victim organization's subscriptionId.
This allows attackers to perform unauthorized billing operations such as changing subscription plans or modifying seat quantities, resulting in potential financial impact and service disruption.
Details
Multiple organization billing endpoints accept subscriptionId directly from user input without validating ownership. The server relies on a client-supplied Stripe subscription identifier rather than resolving the subscription from the authenticated user's organization context.
File
packages/server/src/enterprise/routes/organization.route.ts
Affected routes:
router.post('/update-additional-seats', organizationController.updateAdditionalSeats)
router.post('/update-subscription-plan', organizationController.updateSubscriptionPlan)
updateSubscriptionPlan
File
packages/server/src/enterprise/controllers/organization.controller.ts
public async updateSubscriptionPlan(req: Request, res: Response, next: NextFunction) {
const { subscriptionId, newPlanId, prorationDate } = req.body
const identityManager = getRunningExpressApp().identityManager
const result = await identityManager.updateSubscriptionPlan(
req,
subscriptionId,
newPlanId,
prorationDate
)
return res.status(StatusCodes.OK).json(result)
}
The server trusts the user-supplied subscriptionId and forwards it to the Stripe integration layer.
Missing validation:
subscriptionId belongs to req.user.activeOrganization
updateAdditionalSeats
public async updateAdditionalSeats(req: Request, res: Response, next: NextFunction) {
const { subscriptionId, quantity, prorationDate } = req.body
const identityManager = getRunningExpressApp().identityManager
const result = await identityManager.updateAdditionalSeats(
subscriptionId,
quantity,
prorationDate
)
return res.status(StatusCodes.OK).json(result)
}