
Cloud Vulnerability DB
A community-led vulnerabilities database
Conditions using the collection operators $some, $none, $every and $size are compiled to a subquery. Entity filters (@Filter(), e.g. a soft delete or a tenant filter) are not applied inside that subquery, neither to the collection items nor to relations referenced in the operator payload. The same condition written without a collection operator applies them. The $size operator exists only in v7; on v6 the affected operators are $some, $none and $every.
Rows that an enabled filter is supposed to exclude take part in evaluating the condition. For example, with a tenant filter on Book, em.find(Tag, { books: { $some: { title: 'foo' } } }) returns tags that match only through a book of another tenant, and { books: { $size: 2 } } counts soft-deleted books.
This happens with queries written by the application, with no crafted input. The returned entities are still subject to the filters of the queried entity itself, so the exposure is limited to whether a filtered-out related row matches the condition. Applications that let users shape the where condition are more exposed, as the conditions inside the operator can be used to test values of rows hidden by the filters.
Not affected:
populateWhere.| Line | Package | Affected versions |
|---|---|---|
| v7 | @mikro-orm/sql | <= 7.2.12 |
| v6 | @mikro-orm/knex | <= 6.6.19 |
Fixed in 7.2.13 and 6.6.20.
Repeat the filter condition inside the operator payload, e.g. { books: { $some: { title: 'foo', tenant: tenantId } } }.
Source: NVD
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."