Fair Casino Core Pentest
Zealynx audited the Fair Casino TypeScript backend services and frontend verification utilities. The fourteen-day review covered critical money flows (deposits, withdrawals, atomic balance mutations) and the provably-fair game integrity surface (commit-reveal cryptography, seed derivation, server-side game state). Thirteen issues were identified: four High (wallet auth DoS via unstable challenge endpoint; deposit credited to wrong user via sender inference fallback; provably-fair guarantees weakened when client omits seed; server can choose serverSeed after seeing clientSeed), six Medium (mostly around WebSocket subscription enforcement, input validation, and verification consistency), and three Low. All findings were fixed by Fair Casino and verified by Zealynx.
Scope
6 files · 6,500 SLOCFindings
click any row for the full write-upKey Findings
- Wallet authentication blocked by unstable challenge endpoint (H-01, fixed). The challenge endpoint returned HTTP 429 and 500 errors, blocking wallet login and effectively causing denial of service for legitimate users. Phantom never reached the signature step.
- Deposits credited to the wrong user via sender inference fallback (H-02, fixed). When the parsed token transfer returned an unknown sender, the deposit monitor fell back to the first signer in the transaction. In multi-instruction transactions (aggregators, multisig, relayers) the first signer was not the depositor, so credit landed on the wrong account.
- Provably-fair guarantees weakened when the client omits its seed (H-03, fixed). The session initialization allowed the server to generate both
serverSeedandclientSeedwhen no client seed was provided, enabling cherry-picking of seed pairs that produced house-favorable outcomes while still passing verification. - Server could choose
serverSeedafter seeingclientSeed(H-04, fixed). The commit-reveal order was breakable: the server could observeclientSeedbefore committing toserverSeedHash, enabling outcome manipulation without detection by a verifier. - Six Medium findings covered client-seed validation (whitespace, low-entropy, no charset bounds), WebSocket crash events broadcast to all clients without subscription enforcement, WebSocket JWT validation bypassing centralized HTTP controls, verification logic using inconsistent hash/derivation vs gameplay, hexadecimal-string bet amount coercion, and a duplicate Mines start that desynchronized client/server state.
- Three Low findings covered Fairness "Verifier" producing "Verification Successful" results for games that never occurred (not bound to game history), insecure randomness in session ID generation, and a reflected request path in error responses (unnormalized route handling).
All thirteen issues were fixed by Fair Casino and verified by Zealynx during the validation pass.
Team & approval
Disclaimer
This audit is not an endorsement and does not constitute investment advice. Zealynx reviewed the codebase at the commits listed in section 02 over the engagement window. Findings are limited to issues identified within that scope and do not preclude the existence of other vulnerabilities. Subsequent code changes are not covered by this report unless the engagement is explicitly extended.