Executive brief
Klever's blockchain platform validates royalty split percentages by summing them in a 32-bit integer without checking individual entry bounds. An attacker can craft split royalties whose values wrap around during validation (e.g., 0x80000000 + 0x80000000 = 0), bypassing the 10000% ceiling check. At payout, these astronomically large percentages cause the system to credit far more KLV (the native token) than exists in the royalty pool, minting new KLV out of thin air. Any account can exploit this repeatedly by creating a throwaway asset and triggering transfers, inflating the money supply and destroying economic integrity across the chain.
Technical details
The vulnerability is a classic integer overflow in input validation chained with a silent error handler. Klever's KDA (asset creation) code in `core/kapp/builtInFunctions/utils.go` decodes split-royalty percentages as raw uint32 fields with no per-entry upper bound, then sums them into a uint32 accumulator in `core/kapp/kda/create.go` (lines 351–382). The validation function `CheckValid100Params` checks only whether the sum exceeds 10000 (HundredPercent); two entries of 0x80000000 (≈21.5 billion percent) sum to 0x100000000, which wraps to 0 in uint32, passing validation while each stored value remains 0x80000000. At payout time in `core/kapp/accounts/accounts.go` (lines 276–382), the split royalty is computed as `pool × inflatedPct / 10000`, which for a small pool fits in int64 without triggering overflow detection. The remainder after distributing inflated splits becomes negative; the code silently returns `Ok` instead of erroring (line 349: `if royaltiesToPay <= 0 { return Ok }`), effectively minting KLV. The same pattern exists in marketplace buy (`core/kapp/market/market.go`) and ITO buy (`core/kapp/ito/ito.go`). Any unprivileged account can trigger this on-demand by creating a malicious asset (one-time cost) and transferring it repeatedly; no role, allowlist, or smart contract is required. The minted amount is off-ledger (booked supply unchanged), making detection difficult.
Affected products
- Klever klever-go < 1.7.19
Timeline
- 2026-06-22: disclosed: Published in GitHub Advisory Database
- 2026-08-28: advisory: Advisory updated with full technical details and POC
- 2026-06-22: patched: Patched in version 1.7.19