Vulnerability Database

363,159

Total vulnerabilities in the database

@better-auth/stripe: cross-organization billing tampering in organization subscription actions — @better-auth / stripe

Authorization Bypass Through User-Controlled Key

Am I affected?

You are affected if all of these are true:

  • You use @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.
  • The Stripe plugin has subscriptions turned on (subscription.enabled: true).
  • Organization subscriptions are turned on (organization.enabled: true) and you have set an authorizeReference callback.
  • A user can join more than one org. So a user can be a member of an org whose billing they should not manage.

You are not affected if you only use user subscriptions. You are also not affected if org subscriptions are turned off.

Summary

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.

Details

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.

Patches

Upgrade to one of these patched versions:

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.

Workarounds

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.

Impact

  • A signed-in member can make a subscription action run against the wrong org. The action can be cancel, change plan, restore, or billing portal. The target is limited to orgs the member belongs to.
  • Through the billing portal, a member can reach another org's billing details. This includes payment methods, invoices, and subscription state.

Credit

Reported and fixed by Taesu (@bytaesu).

  • Published: Jul 24, 2026
  • Updated: Jul 25, 2026
  • GHSA: GHSA-h3rm-78g3-j7cp
  • Severity: High
  • Exploit:
  • CISA KEV:

CVSS v3:

  • Severity: High
  • Score: 7.1
  • AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N

Frequently Asked Questions

A security vulnerability is a weakness in software, hardware, or configuration that can be exploited to compromise confidentiality, integrity, or availability. Many vulnerabilities are tracked as CVEs (Common Vulnerabilities and Exposures), which provide a standardized identifier so teams can coordinate patching, mitigation, and risk assessment across tools and vendors.

CVSS (Common Vulnerability Scoring System) estimates technical severity, but it doesn't automatically equal business risk. Prioritize using context like internet exposure, affected asset criticality, known exploitation (proof-of-concept or in-the-wild), and whether compensating controls exist. A "Medium" CVSS on an exposed, production system can be more urgent than a "Critical" on an isolated, non-production host.

A vulnerability is the underlying weakness. An exploit is the method or code used to take advantage of it. A zero-day is a vulnerability that is unknown to the vendor or has no publicly available fix when attackers begin using it. In practice, risk increases sharply when exploitation becomes reliable or widespread.

Recurring findings usually come from incomplete Asset Discovery, inconsistent patch management, inherited images, and configuration drift. In modern environments, you also need to watch the software supply chain: dependencies, containers, build pipelines, and third-party services can reintroduce the same weakness even after you patch a single host. Unknown or unmanaged assets (often called Shadow IT) are a common reason the same issues resurface.

Use a simple, repeatable triage model: focus first on externally exposed assets, high-value systems (identity, VPN, email, production), vulnerabilities with known exploits, and issues that enable remote code execution or privilege escalation. Then enforce patch SLAs and track progress using consistent metrics so remediation is steady, not reactive.

SynScan combines attack surface monitoring and continuous security auditing to keep your inventory current, flag high-impact vulnerabilities early, and help you turn raw findings into a practical remediation plan.