When passing an empty dictionary key of type string, the serializer breaks inside the CheckElementName method (BsonWriter.cs)
The bug is thrown because the code tries to access the zero index of string-char array. As the string is empty, there is no indexes for the char array.
I suggest a verification of the element name to test if it is empty, and if it is, throw the BsonSerializationException with a proper message.
I can contribute to this bug resolution in GitHub if I will be authorized.
Thank you all.
(See attachments for a better analysis)