CVE-2026-71537: Paymenter: Credit-refund double-spend race condition in service downgrade (doUpgrade)
Summary
The service downgrade implementation in app/Livewire/Services/Upgrade.php::doUpgrade() executes a proration calculation and a subsequent user credit refund without any transactional safety or database locks. The only concurrency check relies on an unisolated database query checking for existing pending upgrades. Because there is no active database transaction or pessimistic row-level lock spanning this validation and the subsequent credit update, concurrent downgrade requests can bypass the guard simultaneously. This allows a user to trigger multiple refunds for a single service downgrade.
Technical Details
The issue occurs because the application verifies eligibility using an unlocked read operation (Service::upgradable) which checks if a pending upgrade row exists. Since there is no enclosing DB::transaction or lockForUpdate(), multiple requests sent in parallel can all query the database at the same millisecond, observe that no pending upgrade exists, and pass the safety check.
Once passed, each concurrent request inserts its own pending upgrade record and executes $credit->increment('amount', abs($price)). Because the balance updates are not serialized against the initial check, the user's credit balance is cumulatively inflated by $N$ times the refund amount for a single legitimate downgrade.
Impact
This race condition allows any authenticated customer with an active, downgradable service to inflate their spendable credit balance to an arbitrary multiple of their legitimate refund amount.
Because the newly granted balance acts as real, spendable store credit, it can be immediately leveraged to settle future platform invoices or provision additional services, resulting in direct financial and resource loss to the operator.
Other sources
Paymenter is a free and open-source webshop solution for management of hosting services. Prior to 1.5.7, app/Livewire/Services/Upgrade.php::doUpgrade() relies on Service::upgradable to check for a pending service upgrade and later executes $credit->increment('amount', abs($price)) without DB::transaction or lockForUpdate() spanning those operations. An authenticated customer with an active downgradable service can submit concurrent downgrade requests that each observe no pending upgrade, create separate upgrade records, and increment the same account credit balance, producing multiple spendable refunds for one downgrade. This issue is fixed in version 1.5.7.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
composer/paymenter/paymenterto a version that resolves this vulnerability.Fixed in 1.5.7 - Upgrade
Upgrade
Paymenterto a version that resolves this vulnerability.Fixed in 1.5.7
Event History
Frequently Asked Questions
Who can exploit this issue?
An authenticated customer who has an active service that can be downgraded can exploit the race condition. No user interaction beyond the attacker’s own concurrent requests is required.
What does an attacker need to do to trigger the double-spend?
The attacker must submit concurrent downgrade requests for the same eligible service. Each request can pass the pending-upgrade check before the others create their upgrade records, causing multiple credits to be added for one downgrade.
Are installations affected by default?
Affected versions prior to 1.5.7 are exposed when customers can authenticate and have active services eligible for downgrade. The issue is in the downgrade handling path rather than requiring a separate optional component.
What should be done if upgrading is not immediately possible?
Restrict or temporarily disable customer-initiated service downgrades, and review recent downgrade activity for duplicate upgrade records and multiple credit increases associated with the same service downgrade. Upgrade to version 1.5.7 when possible.
How can administrators identify possible exploitation?
Look for multiple upgrade records created for the same service during a downgrade and corresponding repeated increases to the same account credit balance. These events may occur close together because exploitation relies on concurrent requests.