You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The image, music, and video generation providers read successful fal API
JSON bodies via an unbounded await response.json() after the HTTP status
check. A hostile or buggy fal endpoint can stream an arbitrarily large
success body with no Content-Length, forcing the runtime to buffer the
entire payload in memory before parsing and risking OOM/hang.
Route all three success-path reads through the shared
readProviderJsonResponse helper, which reads the body through the same
16 MiB bounded reader used for binary responses and cancels the upstream
stream on overflow. The video path preserves its existing
FAL_VIDEO_MALFORMED_RESPONSE mapping for malformed JSON while letting the
overflow error propagate. Tests updated to stream real Response bodies.
0 commit comments