MikroORM: SQL injection via runtime-controlled identifiers and JSON-path keys
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 7.0.14, 6.6.14
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- 1 on Exploit-DB, 1 proof of concept on GitHub
- Exploitation: none
- Automatable: no
- Technical impact: partial
Summary
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.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: partial
- Record last updated
- Public exploit on Exploit-DB
EDB-52600
Affected versions
- mikro-orm mikro-orm
From 7.0.0-rc.0 · fixed in 7.0.14; fixed in 6.6.14
- @mikro-orm knex
fixed in 6.6.14
- @mikro-orm sql
fixed in 7.0.14
- @mikro-orm/sqlnpm
fixed in 7.0.14
- @mikro-orm/knexnpm
fixed in 6.6.14