CVE-2026-34220
JSON

9.3critical

MikroORM is vulnerable to SQL Injection via specially crafted object

Severity
9.3critical CVSS:4.0 by GitHub_M
Exploit likelihood
0.55% (higher than 47% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-gwhv-j974-6fxm

Description

MikroORM is a TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Prior to versions 6.6.10 and 7.0.6, there is a SQL injection vulnerability when specially crafted objects are interpreted as raw SQL query fragments. This issue has been patched in versions 6.6.10 and 7.0.6.

Affected

Product or packageVersionsReported by
mikro-orm mikro-orm< 6.6.10, >= 7.0.0-rc.0, < 7.0.6CVE List
@mikro-orm/core (npm)before 6.6.10, from 7.0.0-dev.0 before 7.0.6GitHub Advisory Database
mikro-orm mikroormbefore 6.6.10, from 7.0.0 before 7.0.6NVD

All scores

GitHub_M9.3critical CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
CISA-ADP9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHubcritical CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Classification

CWE-89

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.

What each source says

CVE List

MikroORM is a TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Prior to versions 6.6.10 and 7.0.6, there is a SQL injection vulnerability when specially crafted objects are interpreted as raw SQL query fragments. This issue has been patched in versions 6.6.10 and 7.0.6.

GitHub Advisory Database

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.

NVD (es)

MikroORM es un ORM de TypeScript para Node.js basado en los patrones Data Mapper, Unit of Work e Identity Map. Antes de las versiones 6.6.10 y 7.0.6, existe una vulnerabilidad de inyección SQL cuando objetos especialmente diseñados son interpretados como fragmentos de consulta SQL sin procesar. Este problema ha sido parcheado en las versiones 6.6.10 y 7.0.6.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-34220 changed 2026-04-02CVE Terms of Use
GitHub Advisory DatabaseGHSA-gwhv-j974-6fxm changed 2026-03-31CC-BY-4.0
NVDCVE-2026-34220 changed 2026-07-24Public domain