MikroORM is vulnerable to SQL Injection via specially crafted object
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 byem.flush()em.nativeUpdate()em.nativeInsert()em.create()followed byem.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 software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | @mikro-orm/core | < 6.6.10, >= 7.0.0-dev.0, < 7.0.6 | 6.6.10, 7.0.6 |
References
- CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N- Weakness (CWE)
CWE-89- Platform
- npm
- Package
@mikro-orm/core- Disclosed
- 29.03.2026
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-gwhv-j974-6fxm - CC BY 4.0
Vulnerability history: @mikro-orm/core
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 2
- First → latest
- 03.2026 03.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 1
- High 1
Disclosures per year
- 2026: 2
-
MikroORM is vulnerable to SQL Injection via specially crafted object this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.