GIVE YOUR AGENT THE EVIDENCE

Set up in your agent.

One prompt to get started. Paste it into your coding agent to connect cve.new through MCP and bring vulnerability context into your workflow.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

GIVE YOUR AGENT THE EVIDENCE

Investigate in your agent.

Turn this advisory into a focused investigation. Ask your agent to check your project’s versions, explain the evidence, and suggest a compatible fix.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

GHSA-pgcq-8grm-5rx9medium5.3

Paymenter has race condition in payWithCredit() that enables credit double-spend

Check your stack

The advisory, in context

Summary

The credit payment implementation in app/Livewire/Invoices/Show.php executes a pessimistic row lock (lockForUpdate()) outside of an active database transaction. Because MySQL/MariaDB requires an enclosing transaction to enforce row-level locks, the guard is ineffective. Concurrent payment requests can exploit this race condition to read the same credit balance simultaneously, allowing users to pay multiple invoices using the same credit balance.

Technical Details

The issue occurs because the application attempts to lock the user's credit balance row in the database (lockForUpdate()) without opening a database transaction. In database systems like MySQL, a row lock only works inside a formal transaction; without one, the lock is completely ignored.

Because there is no active lock, two payment requests sent at the exact same millisecond can look at the database at the same time. Both requests see the original credit balance, decide it is sufficient, and approve the payment.

Impact

This race condition allows any authenticated user with a valid credit balance to bypass balance restrictions and settle multiple pending invoices simultaneously for the cost of a single invoice.

Because the payment processes successfully through ExtensionHelper::addPayment(), the application provisions the corresponding services or digital goods, resulting in direct financial or resource loss to the platform.

Affected packages

Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.

Ecosystem versions

Earlier releases before 1.5.5

Fixed in 1.5.5

33 explicitly affected versions

0.1, 0.1.1, 0.1.2, 0.1.3, 0.2, 0.2.1, v0.3, v0.4, v0.4.1, v0.5, v0.5.1, v0.5.2, v0.5.3, v0.6, v0.7, v0.7.1, v0.8, v0.8.1, v0.8.2, v0.9, v0.9.1, v0.9.2, v0.9.3, v0.9.4, v0.9.5, v1.0.0, v1.0.1, v1.0.2, v1.0.3, v1.0.4, v1.1.0, v1.1.1, v1.5.4

View affected-version evidence
{
  "ranges": [
    {
      "events": [
        {
          "introduced": "0"
        },
        {
          "fixed": "1.5.5"
        }
      ],
      "type": "ECOSYSTEM"
    }
  ],
  "versions": [
    "0.1",
    "0.1.1",
    "0.1.2",
    "0.1.3",
    "0.2",
    "0.2.1",
    "v0.3",
    "v0.4",
    "v0.4.1",
    "v0.5",
    "v0.5.1",
    "v0.5.2",
    "v0.5.3",
    "v0.6",
    "v0.7",
    "v0.7.1",
    "v0.8",
    "v0.8.1",
    "v0.8.2",
    "v0.9",
    "v0.9.1",
    "v0.9.2",
    "v0.9.3",
    "v0.9.4",
    "v0.9.5",
    "v1.0.0",
    "v1.0.1",
    "v1.0.2",
    "v1.0.3",
    "v1.0.4",
    "v1.1.0",
    "v1.1.1",
    "v1.5.4"
  ]
}

References