Backend: assets list endpoint has no LIMIT cap — ?limit=999999999 OOMs the API #119
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixed in
04ce096.GET /api/v1/assetsclampslimittoMAX_LIMIT = 500and sanitises bothlimit/offsetto integers, defaulting to 50 / 0 on bogus input.zgaetano referenced this issue2026-05-26 18:22:49 -04:00
Fix Plan — #119 Assets list endpoint has no LIMIT cap
Root cause:
assets.js:92-93passesreq.query.limitdirectly into SQLLIMITwithout max cap.?limit=999999999→ PG allocates gigantic result set → OOM.Fix — clamp on all list endpoints:
Apply to:
assets.js,recorders.js,projects.js,bins.js,schedules.js,groups.js,users.js— every endpoint accepting?limit.Files: All route files with list endpoints
Effort: ~30min
**Priority: P2 — DoS vector