
Bilingual analysis and safe PoC for CVE-2026-124576, a BeikeShop PayPal payment bypass and guest-order IDOR, with source checks, offline logic model, and fix review.
English | Português do Brasil
Technical analysis, safe proof-of-concept material, an offline logic model, and reproducible source checks for a payment workflow vulnerability in BeikeShop's PayPal REST integration.
| Field | Value |
|---|---|
| Product | BeikeShop |
| Affected versions | 2.0.0.0 through 2.0.0.31 |
| Audited revision | f41f3909c3dfbb4a8a0cfe39491dd805c7cf1f7a |
| PayPal plugin | 1.1.0 |
| Fixed version | 2.0.0.32 |
| Security fix | 6cf25f8 |
| Endpoint | POST /paypal/capture |
| Parameters | paypalOrderId, order_number |
| Weaknesses | CWE-840, CWE-841, plus guest-order access-control failure |
| Required privilege | None; guest checkout is supported |
| CVSS 3.1 | 7.3 High — CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
| CVSS 4.0 | 6.9 Medium |
| Researcher | Fernando Viana — Capivara Research |
BeikeShop's default PayPal REST capture flow accepted a PayPal order identifier and a local BeikeShop order number supplied by the client. The application captured the PayPal transaction and treated status === COMPLETED as sufficient proof that the selected local order had been paid.
The vulnerable flow did not verify that:
An attacker could pay a genuine low-value PayPal Sandbox order and submit its paypalOrderId with the number of an unrelated, higher-value BeikeShop order. The completed low-value transaction could cause the unrelated order to be marked PAID.
The defect breaks the server-side binding between the payment confirmed by PayPal and the local order whose state BeikeShop changes.
attacker creates a cheap local order
|
v
PayPal approves a genuine cheap payment
|
v
attacker combines the cheap paypalOrderId
with a different expensive order_number
|
v
guest lookup resolves the unrelated order
|
v
REST capture checks only COMPLETED
|
v
unrelated expensive order becomes PAID
The same plugin already contained the missing design pattern in its NVP/SOAP branch: validateNvpDetails() compared PayPal amount, currency, and invoice data with the local order. Equivalent validation was absent from the default REST path.
The demonstrated chain requires:
2.0.0.31 or an earlier affected 2.0.0.x release;The original research established the chain through source review. It was not executed against a production PayPal merchant account and did not move real funds. The dynamic helper is restricted to an explicitly supplied local or authorized PayPal Sandbox environment and is dry-run by default.
PaypalController::capture() read both identifiers from the request, resolved the local order, and invoked REST capture without a persisted binding between those objects:
$paypalOrderId = $data['paypalOrderId'];
$orderNumber = $data['order_number'];
$order = OrderRepo::getOrderByNumber($orderNumber, $customer);
$result = $paypalService->paypalClient->capturePaymentOrder($paypalOrderId);
The vulnerable REST success predicate reduced the provider response to:
return $status === 'COMPLETED';
It did not compare the capture amount, currency, custom_id, invoice number, or local total.
OrderRepo::getOrderByNumber() added a customer restriction only when a logged-in customer existed:
if ($customerId) {
$builder->where('customer_id', $customerId);
}
For a guest request, a plaintext order number could select the order. Numbers also used a date prefix and a five-digit rand() value, which is not a cryptographic authorization capability.
| Stage | Code path | Missing control |
|---|---|---|
| Request | PaypalController::capture() | Trusts both client identifiers |
| Lookup | OrderRepo::getOrderByNumber() | No guest capability/session check |
| Provider action | capturePaymentOrder() | No local-order binding validation |
| Decision | PaypalService::isPaymentSuccessful() | Accepts status without amount or currency |
| State change | markOrderPaid() | Applies one transaction to the selected order |
The poc/ directory contains:
check_source.py, a read-only vulnerable/fixed source classifier;logic_model.py, an offline demonstration of the logic flaw;request.http, a documented raw request template;poc.sh, a dry-run-by-default PayPal Sandbox helper;verify-source.sh, the original source verifier; andpython3 poc/logic_model.py
This does not contact BeikeShop or PayPal. It compares status-only validation with the fixed binding, amount, and currency checks.
python3 poc/check_source.py /path/to/beikeshop
| Exit code | Meaning |
|---|---|
0 | Fixed controls detected |
1 | Vulnerable source pattern detected |
2 | Invalid or inconclusive source tree |
docker build -t cve-2026-124576 .
docker run --rm cve-2026-124576
The image inspects the official v2.0.0.31 source and treats detection of the expected vulnerable pattern as a successful regression demonstration.
| Release | Guest authorization | REST validation | Mismatched payment/order |
|---|---|---|---|
<= 2.0.0.31 | Plain order number can resolve guest order | Status-only | Unrelated order may be marked paid |
2.0.0.32+ | Session-bound authorization | Binding, amount, currency, capture validation | Request is rejected |