Several plugins read an entire pod resource into memory via Buffer.from(await res.arrayBuffer()) / res.text() with no size cap: rss, backup, s3, caldav/carddav. One-at-a-time processing bounds it to the largest single resource, but a single multi-GB pod file could OOM the process.
corsproxy/ is the counter-example — it streams with a maxBodyBytes cap and aborts the upstream when exceeded.
Fix direction: a shared capped-read helper (check Content-Length, or cap the streamed read and abort past a limit) that the loopback-walk family adopts. Accepted-risk in SECURITY.md.
Several plugins read an entire pod resource into memory via
Buffer.from(await res.arrayBuffer())/res.text()with no size cap: rss, backup, s3, caldav/carddav. One-at-a-time processing bounds it to the largest single resource, but a single multi-GB pod file could OOM the process.corsproxy/is the counter-example — it streams with amaxBodyBytescap and aborts the upstream when exceeded.Fix direction: a shared capped-read helper (check
Content-Length, or cap the streamed read and abort past a limit) that the loopback-walk family adopts. Accepted-risk in SECURITY.md.