ReviewOS

stacks/ts-analytics

Ingest hardening: no body-size cap; pageview fields stored unbounded

#173
Closed glennmichael123 opened this 9 days ago ·
9 days ago

Caps exist only on event/heatmap paths; the pageview path stores title/referrer/path verbatim — a 2MB title 500'd against the DynamoDB item limit and the pageview was LOST (live-verified). No body-size cap before request.json() enables memory-amplification DoS. Fix: reject bodies >16KB pre-parse; slice pageview fields.

From the production-readiness audit (docs/research/production-readiness.md, eacf996). Verified with live probes where stated.

9 days ago

Fixed — 16KB pre-parse body cap (413), malformed JSON 400, pageview title/referrer truncation at ingest. Verified live.

Sign in to comment on this issue.