Is there protection against NoSQL injections in the official MongoDB driver for .NET?

67 Views Asked by At

Does the official MongoDb driver for .NET have protection against NoSQL injections? It would be great to get a link to part of the repository with the code or logic that provides this protection (if there is protection).

1

There are 1 best solutions below

0
On

Not specific to the .NEt driver, but this is apparenlty not problematic unless you are building JavaScript queries manually

https://www.mongodb.com/docs/manual/faq/fundamentals/#javascript

BSON queries will simply fail:

https://www.mongodb.com/docs/manual/faq/fundamentals/#how-does-mongodb-address-sql-or-query-injection-