Found an issue where the server accepts whatever total the client sends in a purchase event. I'm seeing items get sold for less than their configured price when someone modifies the client call.
The event looks like this:
local QBCore = exports['qb-core']:GetCoreObject()
RegisterNetEvent('shop:buy', function(itemName, quantity, total)
local player = QBCore.Functions.GetPlayer(source)
player.Functions.RemoveMoney('cash', total)
player.Functions.AddItem(itemName, quantity)
end)Server validates the item name exists but trusts the total field completely. Client can send any number and it gets deducted from their cash. Normal UI purchases work fine since they calculate correctly, but a modified client can just send 1 as the total regardless of the actual item price.
Reproduced this by calling the event directly with a lower total value. Not sure what other fields might be safe to accept from the client - probably just the item name and quantity need validation against server-side pricing?
VortexGamer · 27/08/2026
This is a classic client-trust issue in QBCore. The server's accepting the total parameter directly from the client without validation means any modified client can bypass the actual pricing system. The reproduction shows the vulnerability clearly - normal UI flow calculates correctly but direct event calls with tampered totals go through unchecked.
Based on the evidence, the fix needs to move the price calculation server-side. Only accept itemName and quantity from the client, then validate those against your server configuration before calculating the actual total. This keeps the change minimal while closing the trust boundary.
CloudStrife · 28/08/2026
Sign in to reply.