GHSA-P5QC-4QFJ-2RQ7
Unauthenticated PayPal capture allows unauthorized invoice payments
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-P5QC-4QFJ-2RQ7 divulgada · CVSS 7.5 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
An unauthenticated attacker can invoke Paymenter's PayPal capture endpoint to process PayPal orders without authentication, session validation, or CSRF protection.
The endpoint trusts the PayPal order's `invoice_id` and captured amount without verifying that the order belongs to the targeted invoice or that the payment currency and amount match the invoice's requirements.
As a result, a mismatched PayPal payment can potentially mark an invoice as paid and trigger service provisioning or account credit creation. Exploiting cross-invoice payments or currency mismatches requires an attacker-controlled approved PayPal order, which has not been independently verified.
Technical Details
`extensions/Gateways/PayPal/routes.php` registers the capture endpoint without authentication middleware:
Route::post('/extensions/paypal/capture', [PayPal::class, 'capture']);The endpoint remains registered even when the PayPal extension is disabled because gateway extensions are booted regardless of their enabled status.
`extensions/Gateways/PayPal/PayPal.php` accepts an arbitrary `orderID` and retrieves and captures the corresponding PayPal order using the merchant's credentials.
The captured payment is then credited using values obtained directly from the PayPal order:
ExtensionHelper::addPayment(
$order->purchase_units[0]->invoice_id,
'PayPal',
$response->purchase_units[0]->payments->captures[0]->amount->value,
$response->purchase_units[0]->payments->captures[0]->seller_receivable_breakdown->paypal_fee->value,
$response->purchase_units[0]->payments->captures[0]->id
);No server-side binding is maintained between the PayPal order ID and the Paymenter invoice. The capture handler also does not verify invoice ownership, payment currency, or the expected amount.
Additionally, `app/Models/Invoice.php` calculates the remaining invoice balance by summing successful transaction amounts without considering their currencies:
get: fn () => ($this->moneyToCents($this->total)
- $this->transactions
->where('status', InvoiceTransactionStatus::Succeeded)
->sum(fn ($t) => $this->moneyToCents($t->amount))) / 100.0When the calculated remaining balance reaches zero, `InvoiceTransactionCreatedListener` marks the invoice as paid.
This subsequently triggers `ProcessPaidInvoiceService`, which can activate or renew services and add account credit.
Because the currency is not validated before recording the payment, a captured amount in a different currency can be treated as equivalent to the invoice's currency.
Impact
An unauthenticated caller possessing a valid PayPal order ID can trigger the merchant-side capture process and associated payment recording without an authenticated Paymenter session.
If an attacker can supply an approved PayPal order with a chosen invoice reference or mismatched currency, the missing validation could allow unauthorized invoice payments or financial underpayment.
For example, a payment captured in a lower-value currency could be credited numerically against an invoice denominated in a higher-value currency, potentially satisfying the invoice without receiving its actual monetary value.
Successful exploitation could result in unauthorized service activation, renewals, or account credit creation without the required payment.
The unauthenticated capture endpoint and missing validation are confirmed. However, the ability to create a suitable attacker-controlled PayPal order has not been verified against the live PayPal API, so the full financial impact remains conditional on that prerequisite.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
PackagistPaymenter/Paymenter |
Sin parche | — | — | — |
Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/Paymenter/Paymenter/security/advisories/GHSA-p5qc-4qfj-2rq7Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
