GHSA-h3rm-78g3-j7cpHigh· 7.1▾ Twilight@better-auth/stripe: cross-organization billing tampering in organization subscription actions
▾ Twilight zone — High severity, or a signal on a lesser flaw
impact 39.1 · likelihood 0 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
You are affected if all of these are true:
@better-auth/stripe from version 1.4.11 up to a patched version below. This covers the stable line through 1.6.20 and every 1.7.0 beta through 1.7.0-beta.9.subscription.enabled: true).organization.enabled: true) and you have set an authorizeReference callback.You are not affected if you only use user subscriptions. You are also not affected if org subscriptions are turned off.
An org subscription action can run against the wrong org. The actions are cancel, change plan, restore, and open the billing portal. The plugin checks permission against the org id in the request query string. It then runs the action against the caller's active org from their session. When these two ids differ, a member can act on billing for an org they may not manage. The target is always an org the caller belongs to.
The plugin runs two steps for each org subscription action. First, a middleware decides if the caller may use the requested org. It reads the org id from the request body or the query string. It then passes that id to your authorizeReference callback. Second, the route handler runs the action. The handler reads the org id from the request body only. It falls back to the active org in the session when the body has no id.
The gap is the query string. A caller puts an org they may manage in the query string. The middleware approves that org. The handler ignores the query string. It finds no id in the body, so it acts on the caller's active org instead. The check and the action no longer agree.
Upgrade to one of these patched versions:
@better-auth/[email protected] or later.@better-auth/[email protected] or later.The fix resolves the org id once in the middleware. It passes that single value to the handler. The approved org and the acted-on org are now always the same.
If you cannot upgrade, make authorizeReference approve only the caller's active org. Return false when the requested id is not the active org id. Keep your existing role check too:
if (referenceId !== session.activeOrganizationId) {
return false;
}
This forces the approved org and the active org to be the same value.
Reported and fixed by Taesu (@bytaesu).
@better-auth/stripe >= 1.4.11, < 1.6.21@better-auth/stripe >= 1.7.0-beta.0, < 1.7.0-beta.10Upgrade to a patched release:
@better-auth/stripe 1.6.21@better-auth/stripe 1.7.0-beta.10Connected by shared product, vendor, weakness, or advisory.
GHSA-rjg6-39jm-rgg4Critical· 9.9@better-auth/scim: account takeover and stale access via SCIM provider-id collision
GHSA-qq9h-g4jm-xgf3High· 8.3Better Auth: Account takeover via pre-account hijacking on magic-link and email-OTP sign-in
CVE-2026-53515High· 7.1@better-auth/sso: SSO provider may allow registration for any org member without a checking their role
GHSA-p2fr-6hmx-4528Medium· 6.4@better-auth/oauth-provider may provide access tokens for unauthorized audiences via unbound resource indicators
GHSA-j8v8-g9cx-5qf4High· 8.3@better-auth/scim: Account/provider takeover via missing owner binding on non-org SCIM providers
CVE-2026-53512Critical· 9.1Better Auth: OAuth refresh-token replay via missing client authentication on oidc-provider and mcp plugins