@mikro-orm/core is vulnerable to Prototype Pollution
54
Medium Risk
EntityAssigner.assign(), which backs the assign() APIs such as wrap(entity).assign(data), em.assign(entity, data), and entity.assign(data), iterates over the keys of the supplied data without ignoring __proto__, constructor, and prototype. Those keys resolve to inherited accessors on Object.prototype, so they are not treated as unknown properties and are written through to the entity, and a __proto__ key reassigns the prototype of that single entity instance. Applications that pass unvalidated user input directly to an assign() API can have the affected instance corrupted so that instanceof and inherited methods stop resolving, causing unexpected exceptions or a denial of service scoped to that instance. The fix ignores __proto__, constructor, and prototype keys at the top level and inside embeddables.
You are affected if you are using a version that falls within the vulnerable range and you pass unvalidated user input directly to one of the assign() APIs.
@mikro-orm/core is vulnerable to Prototype Pollution in versions 6.0.0 - 6.6.15 and 7.0.0 - 7.1.6.
Upgrade the @mikro-orm/core library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant