MikroORM: SQL injection via unvalidated order direction in orderBy
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-84993
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 15:16 UTC · Revision 1
Source evidence
MikroORM: SQL injection via unvalidated order direction in orderBy
core-osv · Original sourcePublished 16 Sept 2026, 16:28 UTC
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.
osv:CVE-2026-84993
Complete source record
{
"id": "b8bd86be50caf15b1e95633ed583047944652e4c93a3b39385cd39778caf97c1",
"url": "https://osv.dev/vulnerability/CVE-2026-84993",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "MikroORM: SQL injection via unvalidated order direction in orderBy",
"summary": "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.",
"evidence": "osv:CVE-2026-84993",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2026-84993",
"aliases": [
"CVE-2026-84993",
"GHSA-7j79-7q93-6v69"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/mikro-orm/mikro-orm",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "cdf78f62cc34041211368cf3a0ed7e7affb21e2d"
},
{
"introduced": "0f9a62d6e34ce8b50b3195f3d84bb1a70013041b"
},
{
"fixed": "6966bab67c82b738bc04e78f49ca484ca802193a"
},
{
"fixed": "3aba926fd07156f5e1ebf06294fd77ee1215bad5"
},
{
"fixed": "89e5546bf8e10f8465682016a3bdf622ff55d8c5"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "6.6.16"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"introduced": "7.0.0"
},
{
"fixed": "7.1.7"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "3aba926fd07156f5e1ebf06294fd77ee1215bad5"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "89e5546bf8e10f8465682016a3bdf622ff55d8c5"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "cdf78f62cc34041211368cf3a0ed7e7affb21e2d"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v6.6.16"
},
{
"range": [
{
"fixed": "6966bab67c82b738bc04e78f49ca484ca802193a"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v7.1.7"
}
]
}
}
],
"versions": [
"v7.1.6",
"v7.1.5",
"v6.6.15",
"v7.1.4",
"v7.1.3",
"v7.1.2",
"v7.1.1",
"v7.1.0",
"v7.0.17",
"v7.0.16",
"v7.0.15",
"v6.6.14",
"v7.0.14",
"v7.0.13",
"v7.0.12",
"v7.0.11",
"v6.6.13",
"v7.0.10",
"v7.0.9",
"v7.0.8",
"v6.6.12",
"v7.0.7",
"v6.6.11",
"v7.0.6",
"v6.6.10",
"v7.0.5",
"v7.0.4",
"v7.0.3",
"v7.0.2",
"v7.0.1",
"v7.0.0",
"v6.6.9",
"v6.6.8",
"v6.6.7",
"v6.6.6",
"v6.6.5",
"v6.6.4",
"v6.6.3",
"v6.6.2",
"v6.6.1",
"v6.6.0",
"v6.5.9",
"v6.5.8",
"v6.5.7",
"v6.5.6",
"v6.5.5",
"v6.5.4",
"v6.5.3",
"v6.5.2",
"v6.5.1",
"v6.5.0",
"v6.4.16",
"v6.4.15",
"v6.4.14",
"v6.4.13",
"v6.4.12",
"v6.4.11",
"v6.4.10",
"v6.4.9",
"v6.4.8",
"v6.4.7",
"v6.4.6",
"v6.4.5",
"v6.4.4",
"v6.4.3",
"v6.4.2",
"v6.4.1",
"v6.4.0",
"v6.3.13",
"v6.3.12",
"v6.3.11",
"v6.3.10",
"v6.3.9",
"v6.3.8",
"v6.3.7",
"v6.3.6",
"v6.3.5",
"v6.3.4",
"v6.3.3",
"v6.3.2",
"v6.3.1",
"v6.3.0",
"v6.2.9",
"v6.2.8",
"v6.2.7",
"v6.2.6",
"v6.2.5",
"v6.2.4",
"v6.2.3",
"v6.2.2",
"v6.2.1",
"v6.2.0",
"v6.1.12",
"v6.1.11",
"v6.1.10",
"v6.1.9",
"v6.1.8",
"v6.1.7",
"v6.1.6",
"v6.1.5",
"v6.1.4",
"v6.1.3",
"v6.1.2",
"v6.1.1",
"v6.1.0",
"v6.0.7",
"v6.0.6",
"v6.0.5",
"v6.0.4",
"v6.0.3",
"v6.0.2",
"v6.0.1",
"v6.0.0",
"v5.9.2",
"v5.9.1",
"v5.9.0",
"v5.8.10",
"v5.8.9",
"v5.8.8",
"v5.8.7",
"v5.8.6",
"v5.8.5",
"v5.8.4",
"v5.8.3",
"v5.8.2",
"v5.8.1",
"v5.8.0",
"v5.7.14",
"v5.7.13",
"v5.7.12",
"v5.7.11",
"v5.7.10",
"v5.7.9",
"v5.7.8",
"v5.7.7",
"v5.7.6",
"v5.7.5",
"v5.7.4",
"v5.7.3",
"v5.7.2",
"v5.7.1",
"v5.7.0",
"v5.6.16",
"v5.6.15",
"v5.6.14",
"v5.6.13",
"v5.6.12",
"v5.6.11",
"v5.6.10",
"v5.6.9",
"v5.6.8",
"v5.6.7",
"v5.6.6",
"v5.6.5",
"v5.6.4",
"v5.6.3",
"v5.6.2",
"v5.6.1",
"v5.6.0",
"v5.5.3",
"v5.5.2",
"v5.5.1",
"v5.5.0",
"v5.4.2",
"v5.4.1",
"v5.4.0",
"v5.3.1",
"v5.3.0",
"v5.2.4",
"v5.2.3",
"v5.2.2",
"v5.2.1",
"v5.2.0",
"v5.1.5",
"v5.1.4",
"v5.1.3",
"v5.1.2",
"v5.1.1",
"v5.1.0",
"v5.0.5",
"v5.0.4",
"v5.0.3",
"v5.0.2",
"v5.0.1",
"v5.0.0",
"v4.5.3",
"v4.5.2",
"v4.5.1",
"v4.5.0",
"v4.4.4",
"v4.4.3",
"v4.4.2",
"v4.4.1",
"v4.4.0",
"v4.3.4",
"v4.3.3",
"v4.3.2",
"v4.3.1",
"v4.3.0",
"v4.2.3",
"v4.2.2",
"v4.2.1",
"v4.2.0",
"v4.1.1",
"v4.1.0",
"v4.0.7",
"v4.0.6",
"v4.0.5",
"v4.0.4",
"v4.0.3",
"v4.0.2",
"v4.0.1",
"v4.0.0",
"v3.6.15",
"v3.6.14",
"v3.6.13",
"v3.6.12",
"v3.6.10",
"v3.6.9",
"v3.6.8",
"v3.6.7",
"v3.6.6",
"v3.6.5",
"v3.6.4",
"v3.6.3",
"v3.6.2",
"v3.6.1",
"v3.6.0",
"v3.5.2",
"v3.5.1",
"v3.5.0",
"v3.4.1",
"v3.4.0",
"v3.3.6",
"v3.3.5",
"v3.3.4",
"v3.3.3",
"v3.3.2",
"v3.3.1",
"v3.3.0",
"v3.2.1",
"v3.2.0",
"v3.1.1",
"v3.1.0",
"v3.0.1",
"v3.0.0",
"v3.0.0-rc",
"v2.7.9",
"v2.7.8",
"v2.7.7",
"v2.7.6",
"v2.7.5",
"v2.7.4",
"v2.7.3",
"v2.7.2",
"v2.7.1",
"v2.7.0",
"v2.6.0",
"v2.5.0",
"v2.4.0",
"v2.3.2",
"v2.3.1",
"v2.3.0",
"v2.2.2",
"v2.2.1",
"v2.2.0",
"v2.1.1",
"v2.1.0",
"v2.0.3",
"v2.0.2",
"v2.0.1",
"v2.0.0",
"v2.0.0-rc",
"v1.2.3",
"v1.2.2",
"v1.2.1",
"v1.2.0",
"v1.1.1",
"v1.1.0",
"v1.0.3",
"v1.0.2",
"v1.0.1",
"v1.0.0",
"v0.10.9",
"v0.10.8",
"v0.10.7",
"v0.10.6",
"v0.10.5",
"v0.10.4",
"v0.10.3",
"v0.10.2",
"v0.10.1",
"v0.10.0",
"v0.9.9",
"v0.9.8",
"v0.9.7",
"v0.9.6",
"v0.9.5",
"v0.9.4",
"v0.9.3",
"v0.9.2",
"v0.9.1",
"v0.9.0",
"v0.8.2",
"v0.8.1",
"v0.8.0",
"v0.7.4",
"v0.7.3",
"v0.7.2",
"v0.7.1",
"v0.7.0",
"v0.6.8",
"v0.6.7",
"v0.6.6",
"v0.6.5",
"v0.6.4",
"v0.6.3",
"v0.6.2",
"v0.6.1",
"v0.6.0",
"v0.5.6",
"v0.5.5",
"v0.5.4",
"v0.5.3",
"v0.5.2",
"v0.5.1",
"v0.5.0",
"v0.4.0",
"v0.3.5",
"v0.3.4",
"v0.3.2",
"v0.3.1",
"v0.3.0",
"v0.2.3",
"v0.2.2",
"v0.2.1",
"v0.2.0",
"v0.1.1",
"v0.1.0",
"v0.0.2"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-84993.json"
}
}
],
"modified": "2026-10-28T02:30:29.966319477Z",
"provider": "osv",
"references": [
"https://github.com/mikro-orm/mikro-orm/releases/tag/v6.6.16",
"https://github.com/mikro-orm/mikro-orm/releases/tag/v7.1.7",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/84xxx/CVE-2026-84993.json",
"https://github.com/mikro-orm/mikro-orm/security/advisories/GHSA-7j79-7q93-6v69",
"https://nvd.nist.gov/vuln/detail/CVE-2026-84993",
"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/pull/7996",
"https://github.com/mikro-orm/mikro-orm/pull/7997"
],
"provider_metadata": {
"cwe_ids": [
"CWE-89"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/84xxx/CVE-2026-84993.json"
}
},
"related_cves": [
{
"value": "CVE-2026-84993",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 496731,
"published_at": "2026-09-16T16:28:37.304+00:00"
}