MongoDbMessageStore has a vulnerability in its addAllowedPatterns() API, which is intended to restrict deserialization to certain classes. The allow-list must be set before the store is initialized; otherwise, the allow-list is not applied, and the store deserializes all classes by default. This can allow an attacker who controls serialized data in MongoDB to trigger deserialization of arbitrary classes, potentially leading to remote code execution via gadget chains. Applications that correctly configure the allow-list before initialization are not vulnerable.