CRITICAL
GHSA-p9xr-7p9p-gpqx
Feathers has a NoSQL Injection via WebSocket id Parameter in MongoDB Adapter
Quick fix
GHSA-p9xr-7p9p-gpqx — @feathersjs/mongodb: upgrade to the fixed version with the command below.
npm install @feathersjs/mongodb@5.0.42Details
Socket.IO clients can send arbitrary JavaScript objects as the id argument to any service method (get, patch, update, remove). The transport layer performs no type checking on this argument. When the service uses the MongoDB adapter, these objects pass through getObjectId() and land directly in the MongoDB query as operators. Sending {$ne: null} as the id matches every document in the collection.
Are you affected?
Enter the version of the package you're using.
Affected packages
npm/@feathersjs/mongodb
Introduced in:
5.0.0Fixed in: 5.0.42Fix
npm install @feathersjs/mongodb@5.0.42