GHSA-66GW-P8PV-FM9V
Race condition in credit balance updates allows unauthorized credit creation
CVSS:3.1/AV:N/AC:L/PR:L/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-66GW-P8PV-FM9V divulgada · CVSS 6.5 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
An authenticated customer can exploit a race condition in Paymenter's credit balance handling to settle invoices without permanently deducting the credit used for payment.
`ProcessPaidInvoiceService::handle()` updates credit balances using an unlocked read-modify-write operation. When executed concurrently with a credit payment, this operation can overwrite the deducted balance and restore previously spent credit.
The vulnerability is reachable because credit top-up invoices can be paid using account credit through Livewire, bypassing a restriction enforced only in the Blade template. This allows customers to repeatedly settle invoices while retaining their original credit balance.
Technical Details
`app/Services/Invoice/ProcessPaidInvoiceService.php` updates customer credit without a transaction or row-level lock:
$credit = $user->credits()->where('currency_code', $invoice->currency_code)->first();
if ($credit) {
$credit->amount += $item->price;
$credit->save();
}The `save()` operation writes an absolute balance calculated from a previously read value, potentially overwriting concurrent modifications.
Meanwhile, `app/Livewire/Invoices/Show.php` correctly uses `DB::transaction()` and `lockForUpdate()` when deducting credit through `payWithCredit()`.
If both operations overlap, the unlocked update can execute after the locked transaction commits, restoring the credit that was just deducted.
Additionally, `processPayment()` accepts the `credit` payment method without checking whether the invoice contains a credit top-up:
if ($this->selectedMethod === 'credit') {
return $this->payWithCredit();
}The restriction exists only in `themes/default/views/invoices/partials/payment-options.blade.php`:
$itemHasCredit = $invoice->items()->where('reference_type', App\Models\Credit::class)->exists();
@if($credit && !$itemHasCredit)Because `selectedMethod` is client-controlled through Livewire, an authenticated customer can bypass this frontend restriction and trigger the vulnerable credit update.
Similar race conditions were previously addressed in CVE-2026-55219 and CVE-2026-71537, but the credit top-up processing path remains unprotected.
Impact
An authenticated attacker can repeatedly settle legitimate invoices without permanently reducing their account credit balance.
For example, a customer with $100 in credit can pay a $10 invoice while retaining the original $100 instead of having the balance reduced to $90.
This enables unauthorized credit creation and allows attackers to obtain paid services, renewals, or upgrades without the corresponding financial deduction.
The vulnerability requires an authenticated customer account, sufficient existing credit, and concurrent payment operations. It does not require administrative privileges or compromise of an external payment gateway.
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-66gw-p8pv-fm9vLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
