Mongoose uses attacker-controlled discriminator key values, including the default ` t` field, to index plain-object registries like `Model.discriminators` and `schema.discriminators` without verifying if the property belongs to the object itself. This allows values such as `constructor`, `toString`, or `hasOwnProperty` to resolve to inherited built-in functions rather than a registered discriminator. This leads to type confusion during model construction, document creation, hydration, query and update casting, embedded discriminators, and populate operations. Additionally, in the `bulkWrite()` `insertOne` path when `skipValidation` is enabled, using a `constructor` value can result in a raw input object being stored without schema casting or strict filtering. A poisoned document stored in this manner can cause all subsequent queries that hydrate it to fail until the document is deleted.