Skip to content
stake

stake

Sploitus • September 26, 2026

| CWEs | CWE-367 (TOCTOU), CWE-362 (Race Condition), CWE-453 (Insecure Default State) |

The loopback target (`startVulnerableTargetSimulator()` in `index.js`)

1. **Pre-commit hash disclosure** — the `seedRotateScheduled` broadcast

includes `nextSeedHash` before the rotation is committed.

2. **Uncommitted-window bet processing** — `place_bet` packets arriving while

`rotationPending === true` are processed with the *old* server seed and

3. **Missing state reset on commit** — `rotateSeed()` does not invalidate the

queued outcome or the client-seed game state, so the first clean

post-rotation bet receives the attacker-influenced outcome.

git clone

Interactive flow: pick a game (mines / coinflip / crash / limbo /

dice), optionally provide hex seeds (blank = random / probe mode), and the

1. Open the race window and probe candidate payloads,

2. Run post-rotation verification rounds,

3. Report whether round 1 was replayed from the race window,

[PASS] race window opened (rotation scheduled)

[PASS] probe packets processed during window (bet_ack queued)

[PASS] post-rotation round 1 was replayed (state confusion)

[PASS] later rounds use fresh entropy (not replayed)

[PASS] round-1 outcome matches race-window candidate

## Remediation guidance (for the simulated pattern)

- Never disclose `nextSeedHash` before the rotation commit (CWE-200).

- Reject all bet packets while a rotation is pending, atomically

(single-threaded queue + per-connection sequence numbers).

- Reset all per-client-seed game state and invalidate queued outcomes on

rotation commit; re-derive HMAC inputs from the new seed only.