Summary
BeikeShop versions up to 1.6.0.22 contain an improper authorization flaw in the Stripe plugin callback handler, where incoming payment requests are not sufficiently validated against user or session context.
A remote attacker can manipulate the Request arguments sent to the StripeController callback to bypass authorization checks and perform actions as another user or in an unintended context.
Affected context
The vulnerability arises in Chengdu Everbrite Network Technology BeikeShop when the Stripe payment plugin is enabled and handling callback requests in plugins/Stripe/Controllers/StripeController.php.
The affected context is the payment gateway callback endpoint, which processes externally sourced HTTP requests from Stripe (or entities masquerading as Stripe) and applies them to local orders or user accounts.
When the application relies solely on insufficient request attributes or weak verification logic to authorize these callbacks, it becomes possible for a crafted request to be accepted and processed without proper authorization.
Exploit preconditions
- Attack surface: Publicly exposed HTTP endpoint for Stripe callbacks.
- Required access: Network access to the BeikeShop instance; no valid user account is necessarily required if the callback endpoint does not enforce user-based authentication.
- Trigger point: Submission of a crafted callback Request to the StripeController callback function with manipulated parameters (such as order identifiers or payment metadata).
- Why exploitation is possible: The callback handler performs incomplete or incorrect checks on the Request data, failing to robustly verify the authenticity, integrity, and authorization context of the incoming event, which maps to improper authorization (CWE-285) and improper privilege/role management (CWE-266).
Why this happens
The root cause is an authorization design flaw in the Stripe plugin's callback implementation.
Instead of enforcing strong, contextual access control—such as tying callback data to authenticated sessions, verifying signatures, or checking that the operation is permitted for the identified resource—the handler trusts partially validated Request parameters.
This leads to a situation where the callback logic assumes that any request meeting minimal criteria (e.g., having a valid format or known order ID) is authorized to trigger state changes, a pattern characteristic of CWE-285 (Improper Authorization) and CWE-266 (Incorrect Privilege Assignment).
Potential impact
- Unauthorized modification of order status, such as marking orders as paid or canceled.
- Potential unauthorized access to or manipulation of customer transaction records.
- Fraudulent fulfillment of goods or services without legitimate payment.
- Inconsistent financial records and loss of integrity in payment workflows.
- Potential escalation into broader business logic abuse if other operations are wired to the callback events.
General mitigation guidance
Mitigation generally focuses on strengthening authorization and verification at the payment callback layer:
- Enforce strict validation of incoming callback requests using cryptographic signatures or secret tokens issued by the payment provider.
- Ensure that callbacks are bound to specific resources (orders, users) by verifying ownership and permissible state transitions before applying changes.
- Apply least-privilege principles in controller logic, limiting what a callback can modify and ensuring all state changes are gated by explicit access control checks.
- Introduce centralized authorization middleware or policies that uniformly enforce access checks for all plugin controllers and payment-related endpoints.
- Log and monitor callback activity, with safeguards for detecting abnormal or repeated unauthorized attempts, and use defense-in-depth measures such as rate limiting on callback URLs.
How teams detect issues like this
Detection can combine code-level review and runtime monitoring:
- Static analysis and review: Look for controller methods (especially in payment plugins) that:
- Accept external Requests but do not verify signatures or tokens.
- Directly update order or user state based on request parameters without checking permissions.
- Lack calls to shared authorization components or middleware.
- Policy enforcement: Introduce development policies requiring security review for payment and webhook endpoints, including checklists for authentication and authorization coverage.
- Runtime monitoring: Monitor logs for anomalous callback patterns, such as callbacks from unexpected IP ranges, repeated attempts with invalid signatures, or callbacks referencing nonexistent or already-processed orders.
- Automated tooling can be configured to flag routes named as "callback," "webhook," or "notify" that bypass authentication filters, for closer manual inspection.

