{"id":"CVE-2026-34220","aliases":["EUVD-2026-17486","GHSA-gwhv-j974-6fxm"],"status":"published","title":"MikroORM is vulnerable to SQL Injection via specially crafted object","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.","severity":{"version":"4.0","score":9.3,"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","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00434,"percentile":0.37983,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-89"],"published":"2026-03-29T15:44:04Z","modified":"2026-10-28T02:31:13Z","exploits":[{"source":"pocgithub","id":"EQSTLab/CVE-2026-34220","title":"EQSTLab/CVE-2026-34220","date":"2026-04-27","url":"https://github.com/EQSTLab/CVE-2026-34220"},{"source":"pocgithub","id":"yym8538/CVE-2026-34220","title":"yym8538/CVE-2026-34220","date":"2026-08-21","url":"https://github.com/yym8538/CVE-2026-34220"}],"fixes":[{"ecosystem":"npm","package":"@mikro-orm/core","fixed_in":["6.6.10","7.0.6"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"@mikro-orm/core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.6.10"}]}]},{"source":"ghsa","ecosystem":"npm","package":"@mikro-orm/core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"7.0.0-dev.0"},{"fixed":"7.0.6"}]}]},{"source":"osv","ecosystem":"npm","package":"@mikro-orm/core","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"6.6.10"}]}]},{"source":"osv","ecosystem":"npm","package":"@mikro-orm/core","ranges":[{"type":"SEMVER","events":[{"introduced":"7.0.0-dev.0"},{"fixed":"7.0.6"}]}]}],"products":[{"vendor":"mikro-orm","product":"mikro-orm"},{"vendor":"mikro-orm","product":"mikroorm"}],"references":[{"url":"https://github.com/mikro-orm/mikro-orm/security/advisories/GHSA-gwhv-j974-6fxm","tags":["x_refsource_CONFIRM","Vendor Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34220","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-gwhv-j974-6fxm"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/34xxx/CVE-2026-34220.json","tags":["advisory"]},{"url":"https://github.com/mikro-orm/mikro-orm","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-34220","title":"MikroORM is vulnerable to SQL Injection via specially crafted object","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.","status":"published","published":"2026-03-31T15:19:08.52Z","modified":"2026-04-02T15:19:12.949Z","cvss":[{"version":"4.0","score":9.3,"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","level":"critical","assessor":"cna"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"adp"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:20:13.962274Z"}],"euvd":[{"id":"EUVD-2026-17486","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.","status":"published","published":"2026-03-31T15:19:08Z","modified":"2026-04-02T15:19:12Z","cvss":[{"version":"4.0","score":9.3,"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","level":"critical"}],"updated_at":"2026-11-02T19:25:22.606516Z"}],"ghsa":[{"id":"GHSA-gwhv-j974-6fxm","title":"MikroORM is vulnerable to SQL Injection via specially crafted object","description":"## Summary\n\nMikroORM versions \u003c= 6.6.9 and \u003c= 7.0.5 are vulnerable to SQL injection when specially crafted objects are interpreted as raw SQL query fragments.\n\n## Impact\n\nIf 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.\n\n## Affected usage\n\nThe issue occurs when untrusted objects are passed to ORM write APIs such as:\n\n- `wrap(entity).assign(userInput)` followed by `em.flush()`\n- `em.nativeUpdate()`\n- `em.nativeInsert()`\n- `em.create()` followed by `em.flush()`\n\nApplications that validate input types or enforce strict schema validation before passing data to MikroORM are not affected.\n\n## Fix\n\nThe vulnerability was caused by duck-typed detection of internal ORM marker properties.\n\nThe fix replaces these checks with symbol-based markers that cannot be reproduced by user input.","status":"published","published":"2026-03-29T15:44:04Z","modified":"2026-03-31T18:55:03Z","cvss":[{"version":"4.0","score":9.3,"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","level":"critical"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:39:47.075804Z"}],"nvd":[{"id":"CVE-2026-34220","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.","status":"published","published":"2026-03-31T16:16:32.127Z","modified":"2026-07-24T20:10:00.147Z","cvss":[{"version":"4.0","score":9.3,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"critical","assessor":"secondary"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"secondary"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:12:12.261218Z"}],"osv":[{"id":"CVE-2026-34220","title":"MikroORM is vulnerable to SQL Injection via specially crafted object","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.","status":"published","published":"2026-03-31T15:19:08.52Z","modified":"2026-10-28T02:31:13.837051713Z","cvss":[{"version":"4.0","score":9.3,"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","level":"critical"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T15:45:02.247031Z"},{"id":"GHSA-gwhv-j974-6fxm","title":"MikroORM is vulnerable to SQL Injection via specially crafted object","description":"## Summary\n\nMikroORM versions \u003c= 6.6.9 and \u003c= 7.0.5 are vulnerable to SQL injection when specially crafted objects are interpreted as raw SQL query fragments.\n\n## Impact\n\nIf 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.\n\n## Affected usage\n\nThe issue occurs when untrusted objects are passed to ORM write APIs such as:\n\n- `wrap(entity).assign(userInput)` followed by `em.flush()`\n- `em.nativeUpdate()`\n- `em.nativeInsert()`\n- `em.create()` followed by `em.flush()`\n\nApplications that validate input types or enforce strict schema validation before passing data to MikroORM are not affected.\n\n## Fix\n\nThe vulnerability was caused by duck-typed detection of internal ORM marker properties.\n\nThe fix replaces these checks with symbol-based markers that cannot be reproduced by user input.","status":"published","published":"2026-03-29T15:44:04Z","modified":"2026-03-31T19:04:13.281993Z","cvss":[{"version":"4.0","score":9.3,"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","level":"critical"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T15:46:48.191583Z"}]}}
