Summary
A missing authorization check in Zulip's billing API allowed ordinary organization members to initiate a card update session tied to Stripe Checkout.
When the corresponding Stripe webhook completed, the organization's default payment method could be changed without any billing-role permissions, enabling unauthorized modification of how the organization is billed.
Affected context
This vulnerability occurs in Zulip Cloud's payment processing logic, specifically in the API endpoint used to create a card update session during the upgrade or billing update flow.
Prior to the referenced fix, the endpoint was accessible to any authenticated organization member, not just designated billing contacts or administrators.
The Stripe webhook handling logic trusted that the associated session was initiated by an appropriately authorized actor, and updated the organization's default payment method without enforcing a separate billing-specific authorization check.
The issue affected the managed Zulip Cloud service but is not relevant to current self-hosted deployments, which no longer rely on this vulnerable path.
Exploit preconditions
- Attack surface: Zulip Cloud billing/upgrade API exposed to authenticated organization users.
- Required access: Valid organization member account (no billing or admin role required).
- Trigger point: Calling the API endpoint that creates a card update session and then completing the associated Stripe Checkout flow.
- Why exploitation is possible: The endpoint for creating the card update session lacked a billing-specific authorization check, and the Stripe webhook implicitly trusted that any completed session was authorized, allowing the organization's default payment method to be changed by non-billing members.
Why this happens
The root cause is a missing authorization control on a sensitive billing operation, aligning with CWE-863: Incorrect Authorization.
The API endpoint for initiating a card update session enforced only general organization membership, not a more restrictive billing or administrative role, despite the operation affecting payment configuration.
Additionally, the webhook that updates the organization's default payment method did not re-validate user privileges or bind the action to a billing-authorized actor, creating a confused-deputy style trust issue where Stripe's completion of a session was treated as sufficient authorization.
Abstractly, this represents an access-control design flaw where the sensitivity of an operation (changing billing/payment details) exceeds the privileges required to invoke it.
Potential impact
- A regular organization member could change the organization's default payment method without consent from billing administrators.
- An internal actor could redirect charges to a different payment method controlled by them or a third party.
- Unintended financial impact, including failed payments or disruptions in service if invalid methods are set.
- Erosion of auditability and accountability around who is authorized to manage billing details.
General mitigation guidance
Effective mitigation focuses on tightening authorization and designing billing operations with explicit privilege boundaries:
- Require a dedicated billing or administrative role for all endpoints that create, modify, or revoke payment methods, subscriptions, or invoices.
- Enforce authorization at each step of multi-party flows (e.g., both when creating external checkout sessions and when processing related webhooks).
- Bind external payment sessions to a strongly authenticated and role-verified user context, and re-check that context before applying any state changes.
- Apply the principle of least privilege for billing features, separating general user capabilities from financial operations.
- Maintain clear internal documentation of which roles are permitted to perform each billing-related action, and align API checks with that model.
How teams detect issues like this
Organizations can detect similar authorization weaknesses using a combination of review and automation:
- Static analysis and code review: Flag endpoints that modify billing or payment state but only check for generic authentication rather than specific roles or permissions.
- Access control design review: Periodically audit all billing-related routes and webhook handlers to ensure they enforce consistent, centralized authorization logic.
- Logging and monitoring: Instrument detailed logs for billing configuration changes, including the initiating user, role, and source endpoint; alert on changes initiated by non-billing roles.
- Automated policy enforcement: Use automated security review tools or CI checks that validate adherence to access-control policies (e.g., requiring explicit permission checks for certain namespaces or modules like "/billing" or "/payments").

