Intel

AIKIDO-2026-645757

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

Incorrect Control Flow ImplementationGHSA-mp38-qxj6-v7jr Published 2 days ago

30

Low Risk

This Affects:

JS@mikro-orm/sql
0.0.1 - 7.1.8
Fixed in 7.1.9
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.

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.

Background info

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

How to fix this

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