CVE-2026-34220
March 30, 2026
Summary MikroORM versions <= 6.6.9 and <= 7.0.5 are vulnerable to SQL injection when specially crafted objects are interpreted as raw SQL query fragments. Impact If user-controlled input is passed directly to MikroORM query construction APIs, an attacker may inject raw SQL fragments. This can lead to SQL injection depending on the database and query being executed. Affected usage The issue occurs when untrusted objects are passed to ORM write APIs such as: - "wrap(entity).assign(userInput)" followed by "em.flush()" - "em.nativeUpdate()" - "em.nativeInsert()" - "em.create()" followed by "em.flush()" Applications that validate input types or enforce strict schema validation before passing data to MikroORM are not affected. Fix The vulnerability was caused by duck-typed detection of internal ORM marker properties. The fix replaces these checks with symbol-based markers that cannot be reproduced by user input.
Affected Packages
@mikro-orm/core (NPM):
Affected version(s) >=7.0.0-dev.0 <7.0.6Fix Suggestion:
Update to version 7.0.6@mikro-orm/core (NPM):
Affected version(s) >=4.0.0-alpha.0 <6.6.10Fix Suggestion:
Update to version 6.6.10@mikro-orm/core (NPM):
Affected version(s) >=4.0.0-alpha.0 <6.6.10Fix Suggestion:
Update to version 6.6.10@mikro-orm/core (NPM):
Affected version(s) >=7.0.0-dev.0 <7.0.6Fix Suggestion:
Update to version 7.0.6@mikro-orm/core (NPM):
Affected version(s) >=4.0.0-alpha.0 <6.6.10Fix Suggestion:
Update to version 6.6.10@mikro-orm/core (NPM):
Affected version(s) >=7.0.0-dev.0 <7.0.6Fix Suggestion:
Update to version 7.0.6@mikro-orm/core (NPM):
Affected version(s) >=7.0.0-dev.0 <7.0.6Fix Suggestion:
Update to version 7.0.6@mikro-orm/core (NPM):
Affected version(s) >=4.0.0-alpha.0 <6.6.10Fix Suggestion:
Update to version 6.6.10@mikro-orm/core (NPM):
Affected version(s) >=4.0.0-alpha.0 <6.6.10Fix Suggestion:
Update to version 6.6.10@mikro-orm/core (NPM):
Affected version(s) >=7.0.0-dev.0 <7.0.6Fix Suggestion:
Update to version 7.0.6@mikro-orm/core (NPM):
Affected version(s) >=7.0.0-dev.0 <7.0.6Fix Suggestion:
Update to version 7.0.6@mikro-orm/core (NPM):
Affected version(s) >=4.0.0-alpha.0 <6.6.10Fix Suggestion:
Update to version 6.6.10Related Resources (2)
Do you need more information?
Contact UsCVSS v4
Base Score:
9.3
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
NONE
Vulnerable System Confidentiality
HIGH
Vulnerable System Integrity
HIGH
Vulnerable System Availability
NONE
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
9.1
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
NONE
Weakness Type (CWE)
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')