Intel

AIKIDO-2026-449141

@mikro-orm/core is vulnerable to Prototype Pollution

Prototype PollutionGHSA-v5x2-6hgv-vwwv Published 6 days ago

54

Medium Risk

This Affects:

JS@mikro-orm/core
6.0.0 - 6.6.15
Fixed in 6.6.16
7.0.0 - 7.1.6
Fixed in 7.1.7
Are you affected? Scan for Free

TL;DR

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.

Who does this affect?

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.

Background info

@mikro-orm/core is vulnerable to Prototype Pollution in versions 6.0.0 - 6.6.15 and 7.0.0 - 7.1.6.

How to fix this

Upgrade the @mikro-orm/core library to the patch version.