$ the-wire · showcase
OpenClaw bounds provider response reads against memory exhaustion
By RepoJournal · Filed · About OpenClaw
Five fixes cap unbounded JSON responses across APNs, Runway, OpenAI, Together, PixVerse, and fal, closing a class of OOM and hang risks on media and push paths.
OpenClaw shipped a series of fixes bounding HTTP response reads across external provider integrations [1][2][3][4][5]. The shared pattern was an unbounded `await response.json()` on success paths, where a hostile, misconfigured, or SSRF-reachable endpoint streaming a body without `Content-Length` could force the runtime to buffer the entire payload before parsing, risking out-of-memory crashes or hangs. The APNs relay path [1], the Runway create and poll paths [2], the OpenAI video create-submit path [3], Together/PixVerse paths [4], and fal image/music/video paths [5] all now cap reads, with Together, PixVerse, and fal using the existing shared 16 MiB provider limit. The poll and download paths for Runway and OpenAI were already bounded, so only the affected success-path reads changed. These are all defense-in-depth fixes: they harden OpenClaw against misbehaving or compromised endpoints, not against a known live exploit [1][5]. One PR notes they "cap those success-path JSON reads with the existing shared 16 MiB prov" [4].
Action items
- → Review and merge these five response-bounding PRs into your OpenClaw release before exposing the gateway or media paths to untrusted endpoints openclaw/openclaw [monitor]
- → Audit any other provider integrations that still use unbounded response.json() on success paths openclaw/openclaw [immediate]
References
- [1] fix: bound APNs relay response body so an oversized relay reply can't exhaust gateway memory ↗ openclaw/openclaw
- [2] fix(runway): bound video create/poll response reads ↗ openclaw/openclaw
- [3] fix(openai): bound video create-submit response reads ↗ openclaw/openclaw
- [4] fix(together, pixverse): bound video response reads ↗ openclaw/openclaw
- [5] fix(fal): bound music/video generation response reads ↗ openclaw/openclaw