Preparing for system design interviews?  Try bugzed.com →

mongodb-sanitize

JSON →
library 2.2.0 ·javascript
verified Jun 5, 2026

A lightweight security library (v2.2.0) that sanitizes JavaScript objects to prevent MongoDB query selector injection attacks by stripping or replacing dangerous keys starting with '$' (e.g., $gt, $ne, $where). It provides an Express middleware (sanitizes req.body, req.params, req.query by default) and standalone sanitize/isSanitized functions. Ships with TypeScript definitions, supports both ESM and CJS, and has zero runtime dependencies. Updates are infrequent but stable. Key differentiator: focused solely on MongoDB operator stripping with a simple API, unlike broader sanitization libraries.

total hits 19
actors 5 distinct systems
last hit 16d ago human
GPTBot
3
Amazonbot
3
ByteDance
3
Humans
8

top countries 🇺🇸 United States · 🇸🇬 Singapore · VN · 🇨🇦 Canada · 🇺🇦 Ukraine