Bounty
XE-13357 · Bounty

Per-IP API rate limit is partitioned across proxy instances (~5x the documented 1000 reads/5s / 50 writes/5s)

Triaging claimed Medium xe#502 filed 2026-11-12 08:59 UTC by rjuliant

Report

Summary

The documented per-IP rate limit on the public API is not actually shared per client IP — it is partitioned across the load-balanced proxy instances. One client IP is served by several independent token budgets, so the effective ceiling the client can hit before any 429 is returned is several times the documented limit.

Where

  • Versioned proxy: https://test.network/api/v1/* (rate-limit headers emitted by the test.network proxy / nginx layer).
  • Documented policy (OpenAPI x-rate-limits): "per client IP, per request class: reads 1000 per 5s (200/s burst 1000), writes 50 per 5s (10/s burst 50), onExceeded 429 with Retry-After."

What I observed

For a single source IP, across consecutive rapid requests, the RateLimit-Remaining value increases mid-window and RateLimit-Reset reports multiple distinct values concurrently — both impossible for one shared fixed-window counter:

remaining: 999, 998, 997, 999, 999, 998, 997, 996, 999, 998, 997, 999, 998, 999, 998, ...
reset:       5,   4,   1,   5,   5,   4,   3,   1,   5,   4,   2,   5,   3,   5,   4, ...
reset distribution over a ~2s run: {5:9, 4:4, 3:2, 2:2, 1:3}   # 5 distinct reset phases

A single shared fixed-window bucket must show monotonically-decreasing Remaining and a single monotonic Reset within a window. Five interleaved phases + Remaining that climbs back up (997 → 999) indicates ~5 independent backend counters behind a round-robin front.

The write class shows the same: ~80 write-class POSTs over one connection returned 400 for all 80 with zero 429 despite the advertised 50/5s ceiling.

Root cause

The per-IP rate-limit state is not shared across the load-balanced proxy instances (each backend keeps its own counter), so a single client's requests are spread across N independent budgets instead of one.

Impact

The effective per-IP budget a single client can consume before 429 is approximately N× the documented ceiling (≈5000 reads/5s and 250 writes/5s for ~5 instances). This weakens the only documented anti-abuse control on the public API surface and means a single client can sustain far more volume than the published policy states before the proxy starts shedding it.

Reproduce

# read class
for i in $(seq 1 20); do
  curl -s -o /dev/null -D - https://test.network/api/v1/node \
    | grep -iE 'ratelimit-(remaining|reset)'
  sleep 0.08
done
# observe Remaining climb back up (e.g. 997 -> 999) and Reset bounce across
# several distinct values within one window

Severity

Medium — rate-limit abuse / the documented per-IP limit is multiplicatively weaker than stated. (Reinforcement is infra, so re-triage to Low is reasonable if the team treats this as out-of-scope hosting.)

Thread

Joseph Denneteam2026-11-20 00:15 UTCgithub

Thanks for the report. We have read it and are checking how the hosted proxy counts requests against what you observed. We will update this ticket when there is more to share.