Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions dbx/json-bson-injection-warning.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.. warning:: Validate Untrusted Input Before Converting JSON to BSON

If you convert a JSON string to BSON and use the resulting BSON in a
query, update, or command, an attacker can inject operators or
unexpected field values that change the meaning of the operation.
This risk is greatest when the JSON originates from a user, an
API request, or another untrusted source.

To learn more about validating input before conversion, see
:ref:`client-libraries-security-best-practices`.

.. TODO: DOCSP-61609 must define a page with the label
client-libraries-security-best-practices before this ref resolves.
Update the label here if DOCSP-61609 ships with a different one.