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
POST /api/sw-probe accepts client-reported service-worker script URLs and stores every unique foreign/evicted URL string forever in process memory, with no cap on entry count or key length. GET /api/sw-probe returns the full accumulated maps. The endpoint is unauthenticated.
Evidence
pm-stack/aggregator/src/push.ts:110-123 — recordSwProbe appends any string from report.registrations/report.evicted into module-level probe.foreignSeen / probe.evictedSeen maps without bounds:
if (typeof r === "string" && isForeignSwScript(r)) { probe.foreignSeen[r] = (probe.foreignSeen[r] ?? 0) + 1; }
evicted strings are stored similarly with no foreign-script filter.
pm-stack/aggregator/src/push.ts:126-133 — swProbeSummary() returns copies of both full maps, so response size grows with accumulated state.
pm-stack/aggregator/src/server.ts:3409-3415 — /api/sw-probe POST reads a JSON body and records it with no authentication gate in that route; GET exposes the running summary.
Request bodies are bounded by readJsonBody (100KB), but repeated requests can add many distinct entries over time, growing memory and the GET payload without limit.
Why it matters
Unbounded input-driven in-memory growth is a resource-exhaustion risk (memory/response bloat) for the long-lived aggregator process. Because the probe is observational, accumulation beyond what is useful provides no operational value.
Suggested fix shape
Bound the probe state: enforce a maximum number of tracked script URLs and/or maximum key length, drop/ignore entries beyond the cap (or keep only aggregate counts/top-N), and consider bounding the evicted map the same way. Optionally add lightweight input validation (e.g. only accept plausible URL/script-path strings) while keeping the endpoint fail-soft.
Triage verdict (fresh check 2026-11-17T06:36Z): issue #10539 is already resolved. PR #10633 (bound /api/sw-probe maps to cap unbounded memory growth) merged 2026-11-17T01:03:34Z, cross-referenced on this issue, and the issue was closed 2026-11-17T01:03:37Z carrying status:done.
No follow-on packet needed. Completing queue task 19320 as already_done.
Activity
developing-today commentedon Nov 15, 2026
CODE-3823
dezren39 commentedon Nov 17, 2026
agent-note:v1
state: triaged / already_done
task: 19320
lane: any-w
Triage verdict (fresh check 2026-11-17T06:36Z): issue #10539 is already resolved. PR #10633 (bound /api/sw-probe maps to cap unbounded memory growth) merged 2026-11-17T01:03:34Z, cross-referenced on this issue, and the issue was closed 2026-11-17T01:03:37Z carrying status:done.
No follow-on packet needed. Completing queue task 19320 as already_done.