DOCSP-61608: Add shared JSON-to-BSON injection warning admonition - #176
Merged
Conversation
lindseymoore
approved these changes
Jul 9, 2026
lindseymoore
left a comment
Collaborator
There was a problem hiding this comment.
A couple suggestions, LGTM! Please let me know if you'd like another look.
Comment on lines
+3
to
+4
| If you convert a JSON string to BSON and then use the result in a | ||
| query, update, or command, an attacker can inject operators or |
Collaborator
There was a problem hiding this comment.
Suggested change
| If you convert a JSON string to BSON and then use the result in a | |
| query, update, or command, an attacker can inject operators or | |
| 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 |
S: to clarify result
| This risk is greatest when the JSON originates from a user, an | ||
| API request, or another untrusted source. | ||
|
|
||
| To learn more about how to reduce this risk, see |
Collaborator
There was a problem hiding this comment.
Suggested change
| To learn more about how to reduce this risk, see | |
| To learn more about how to validate untrusted input and other methods to reduce this risk, see |
S: To tie back to the title, including 'validate untrusted input' here
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dbx/json-bson-injection-warning.rst) warning developers that converting untrusted JSON to BSON and using it in a query/update/command can enable injection attacks.Notes
sharedincludeis DOCSP-61610, not part of this PR.Test plan
./lint-docs.sh valeagainst the new file — 0 errors, 0 warnings.:ref:target added once DOCSP-61609 lands (follow-up).Jira: https://jira.mongodb.org/browse/DOCSP-61608