Skip to main content

MikroORM CVE-2026-84993

| EUVDEUVD-2026-80875 MEDIUM
SQL Injection (CWE-89)
2026-09-16 GitHub_M
6.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify endpoint binding request data to orderBy direction
  2. Delivery
    Submit crafted direction with SQL fragment
  3. Exploit
    Fragment concatenated into ORDER BY clause
  4. Execution
    Query executes injected expression
  5. Impact
    Blind/boolean extraction of DB-account-readable data

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Persistence

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires an application running MikroORM prior to 6.6.16 or in the 7.0.0-7.1.6 range that binds attacker-controlled request data to the ORDER BY *direction* value in em.find(), em.findOne(), em.findAndCount(), QueryBuilder.orderBy(), or QueryBuilderHelper.getQueryOrderFromObject(). It only affects the SQL drivers (SQLite, PostgreSQL, MySQL, MariaDB, MSSQL, libSQL, Oracle) via the AbstractSqlPlatform/BaseMySqlPlatform/MsSqlPlatform paths; MongoDB is not affected. Limiting factors: the orderBy field KEY is already validated against entity metadata (only the direction is injectable), and the vulnerability is not reachable unless the application passes raw request input as the direction - apps that use fixed/enum-constrained sort directions are not exploitable. Impact is confined to reading data available to the configured database account (blind/boolean extraction); no data modification is possible through this vector.

Impact

This is a genuine but conditional SQL injection (CWE-89) with a moderate real-world risk profile, matching its 6.5 CVSS. The vendor vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N reflects a network-reachable, low-complexity flaw yielding high confidentiality impact (blind/boolean extraction of any data the DB account can read) with no integrity or availability impact - consistent with the description, since only the ORDER BY *direction* token is injectable, which cannot alter data or stack additional statements in a standard concatenation. No EPSS score, no CISA KEV entry, and no public exploit code are provided, so there is no evidence of active exploitation. The decisive caveat is that this is a LIBRARY flaw whose exploitability is entirely gated on downstream application code: it only becomes reachable if an application binds attacker-controlled request data directly to the orderBy direction (e.g. a user-facing sort parameter). PR:L is therefore a modeling choice reflecting a typical authenticated app context - a truly public unauthenticated sort endpoint would be PR:N (higher severity), while an app that never exposes raw direction values is not exploitable at all. Net: a real priority for teams running MikroORM with dynamic sorting bound to request input, but not a mass-exploitation candidate.

Exploit ScenarioDerived

An application exposes a list/search endpoint where a client-supplied sort parameter is passed straight into MikroORM's orderBy direction (e.g. em.find(User, {}, { orderBy: { name: req.query.dir } })). An attacker supplies a crafted direction value containing a raw SQL fragment (e.g. 'asc, (CASE WHEN ... THEN ... END)') instead of asc/desc, which is concatenated unvalidated into the ORDER BY clause and executed, enabling blind/boolean-based extraction of data readable by the database account. No public exploit code is identified, but the fix's regression tests demonstrate injectable payloads such as 'asc, name'.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 16, 2026

SQL injection in the ORDER BY direction handling of MikroORM (a TypeScript ORM for Node.js) lets authenticated remote attackers append arbitrary SQL fragments to generated queries, enabling blind or boolean-based extraction of data readable by the configured database account. Affected are SQL drivers in versions prior to 6.6.16 and 7.0.0 through 7.1.6 (SQLite, PostgreSQL, MySQL, MariaDB, MSSQL, libSQL, Oracle); MongoDB is not affected. Exploitation is conditional - the application must bind attacker-controlled request data directly to the orderBy direction in em.find(), em.findOne(), em.findAndCount(), QueryBuilder.orderBy(), or QueryBuilderHelper.getQueryOrderFromObject(); the field key is already validated against entity metadata, and there is no public exploit identified at time of analysis. Vendor-released fixes exist in 6.6.16 and 7.1.7.

RemediationAI

Upgrade MikroORM to 6.6.16 or 7.1.7 (vendor-released patches, published as release tags https://github.com/mikro-orm/mikro-orm/releases/tag/v6.6.16 and https://github.com/mikro-orm/mikro-orm/releases/tag/v7.1.7); these versions add validateOrderByDirection() allow-list enforcement in AbstractSqlPlatform, BaseMySqlPlatform and MsSqlPlatform. If immediate upgrading is not possible, the most effective compensating control is to stop passing raw request input as the orderBy direction: coerce it through a strict server-side allow-list of the six legitimate values ('asc', 'desc', 'asc nulls first', 'asc nulls last', 'desc nulls first', 'desc nulls last') or map it to the QueryOrder enum before it reaches em.find(), em.findOne(), em.findAndCount(), QueryBuilder.orderBy() or QueryBuilderHelper.getQueryOrderFromObject() - the trade-off is that any client-supplied sort token not in the list is rejected, which may require updating client code and API contracts. Applications that already derive sort direction from fixed enums or hard-coded values are not exploitable, so an audit of call sites that forward user-controlled sort parameters is the fastest way to scope exposure. As a defence-in-depth measure with the operational cost of tighter privilege management, reduce the privileges of the database account used by the application so that blind extraction can only read non-sensitive tables, and consider query logging/monitoring for ORDER BY clauses containing commas or unexpected tokens. Follow the vendor advisory at https://github.com/mikro-orm/mikro-orm/security/advisories/GHSA-7j79-7q93-6v69 for updates; note that MongoDB-backed deployments are unaffected and do not require this change.

Affected VersionsENISA

mikro-orm < 6.6.16
mikro-orm 7.0.0, < 7.1.7

Affected Packages

euvd mikro_orm fix: 6.6.16, 7.1.7

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

MikroORM implements the Data Mapper, Unit of Work and Identity Map patterns and translates entity-level queries into dialect-specific SQL. In the shared SQL layer, AbstractSqlPlatform.getOrderByExpression previously interpolated the direction argument after only lowercasing it, without checking that it was one of the six legitimate ORDER BY modifiers. Because the direction string was concatenated into the ORDER BY clause, an attacker-supplied value such as 'asc, name' could terminate the intended sort expression and introduce additional SQL tokens, the classic CWE-89 improper neutralization of special elements used in an SQL command. The same unchecked flow existed in the BaseMySqlPlatform nulls-translation path and in the MsSqlPlatform fallthrough in packages/mssql/src/MsSqlPlatform.ts. The upstream fix introduces a private allow-list Set on AbstractSqlPlatform containing exactly 'asc', 'desc', 'asc nulls first', 'asc nulls last', 'desc nulls first' and 'desc nulls last', exposes an internal validateOrderByDirection() helper that lowercases and trims the input and throws 'Invalid order direction' for anything outside the set, and routes the AbstractSqlPlatform, BaseMySqlPlatform and MsSqlPlatform code paths through it so enum values and normalized numeric QueryOrder values (1 and -1) continue to work. The accompanying regression test GHx59.test.ts confirms rejection of 'upwards' and 'asc, name' while accepting all six directions and their uppercase variants.

Know when TypeScript gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
vuln.today AI 6.5 MEDIUM

Network-reachable low-complexity injection yielding blind read of DB-account data (C:H); direction-only token prevents modification (I:N/A:N); PR:L reflects typical authenticated app context since reachability depends on app-side binding.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Lifecycle Timeline

1
Patch available
Sep 16, 2026 - 17:04 EUVD

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.5%
Top 59% exploitable
Prevalence
Medium
popular but not ubiquitous TypeScript/Node.js ORM; exploit needs app-side dynamic sort binding
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

CVE-2026-92812 CRITICAL POC
9.3 Sep 16

Path traversal in decap-server 3.10.0 and earlier lets unauthenticated remote attackers read, write, and delete files in

CVE-2026-46649 CRITICAL POC
9.1 Sep 21

Joplin Server instances prior to 3.7.2 expose an SSO login-code redemption endpoint (GET /api/login_with_code/:id) that

CVE-2026-63506 HIGH POC
8.8 Sep 16

Cross-tenant authorization bypass in TinaCMS self-hosted deployments allows any holder of a legitimate TinaCloud account

CVE-2026-63116 HIGH POC
8.8 Sep 21

Authenticated clients on deepstream.io 10.1.0 can bypass record-write authorization and modify arbitrary protected recor

CVE-2026-102911 HIGH POC
8.6 Sep 30

OS command injection in zosmaai's pi-llm-wiki through 0.11.7 lets an attacker who can invoke the wiki_capture_source MCP

CVE-2026-102281 HIGH POC
7.5 Sep 28

A remote, unauthenticated denial-of-service condition in the NestJS (Nest) microservices framework lets an attacker cras

CVE-2026-63627 MEDIUM POC
6.9 Sep 22

Fee-sponsoring servers built on mppx before 0.8.2 can be induced by any client with access to the sponsorship endpoint t

CVE-2026-57138 CRITICAL
9.9 Sep 15

Code escaping sandbox in the PraisonAI npm package's built-in codeMode tool (praisonai 1.4.0 through 1.7.1) lets anyone

CVE-2026-54460 CRITICAL
9.8 Sep 17

Unauthenticated passkey enrollment in OpenReception appointment-booking software prior to 1.1.1 lets remote attackers in

CVE-2026-51996 CRITICAL
9.8 Sep 24

A credential-isolation flaw in geelen mcp-remote 0.1.16 through 0.1.38 allows a remote attacker who controls or can pred

CVE-2026-88404 CRITICAL
9.8 Sep 21

Remote code execution affects Univer v1.0.0-alpha.2 through its Uniscript feature: the UniscriptExecutionService.execute

CVE-2026-86059 CRITICAL
9.6 Sep 22

Dokploy instances running versions prior to 0.29.13 disclose stored Git provider secrets - GitHub App private keys, OAut

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy