Intel

AIKIDO-2026-645757

@mikro-orm/sql is vulnerable to Incorrect Control Flow Implementation

GHSA-mp38-qxj6-v7jrPublished Aug 5, 2026
August 5, 2026

30

CVE Score

Low

Incorrect Control Flow Implementation

Are you affected? Scan for Free

TL;DR

The SQL query builder compiles an empty $or array to no predicate at all instead of an always-false condition, so the intended restriction disappears from the generated SQL. Reads then return every row, and nativeDelete and nativeUpdate operate on the whole table, while $not and having variants emit invalid SQL. An application that builds an allow-list filter that can produce an empty $or fails open silently rather than matching nothing. The fix makes an empty $or compile to a false condition so the query matches no rows.

How do I fix this?

Upgrade the @mikro-orm/sql library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application builds query filters that can produce an empty $or array intended to match no rows.

Versions

0.0.1 - 7.1.8

Fixed in 7.1.9

Background info

@mikro-orm/sql is vulnerable to Incorrect Control Flow Implementation in versions 0.0.1 - 7.1.8.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea