Vulnerability DatabaseGHSA-3qjc-mqvq-rch9

GHSA-3qjc-mqvq-rch9: 
JavaScript vulnerability analysis and mitigation

Summary

The having option of em.find(), em.findOne(), em.findAndCount(), em.findByCursor(), em.count() and em.countBy() is typed as a filter object (em.countBy() exists only in v7). When a string is passed at runtime, it is embedded into the HAVING clause as raw SQL instead of being rejected.

Impact

Applications are affected when a request-controlled value reaches the having option without checking that it is an object, e.g. when parsed JSON is forwarded into the find options. A string in that position is appended to the query as is, which allows reading data the query was not meant to return, including hidden properties and other tables. On drivers that send several statements in one query, it also allows running additional statements. All SQL drivers are affected. The same string passed as where is handled as a primary key value and is not affected. Not affected:

  • applications that build having themselves or do not use it,
  • qb.having() on the QueryBuilder, which is documented to accept a raw SQL string.

Affected versions

LinePackageAffected versions
v7@mikro-orm/sql<= 7.2.12
v6@mikro-orm/knex<= 6.6.19

Patches

Fixed in 7.2.13 and 6.6.20.

Workarounds

Do not pass request data to the having option, or verify it is a plain object first.


Source: NVD

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-3qjc-mqvq-rch9HIGH7.6
  • JavaScript logoJavaScript
  • @mikro-orm/knex
NoYesNov 27, 2026
GHSA-j4pj-2xg4-35f6HIGH7.4
  • JavaScript logoJavaScript
  • @mikro-orm/mariadb
NoYesNov 27, 2026
GHSA-vrvp-5qx2-7xcmMEDIUM6.5
  • JavaScript logoJavaScript
  • @mikro-orm/knex
NoYesNov 27, 2026
GHSA-9phx-3fcw-32vfLOW3.7
  • JavaScript logoJavaScript
  • saxen
NoYesNov 27, 2026
GHSA-288x-p79m-78v5LOW3.7
  • JavaScript logoJavaScript
  • @mikro-orm/knex
NoYesNov 27, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management