Vulnerability DatabaseGHSA-m7x9-2hqg-jvqx

GHSA-m7x9-2hqg-jvqx: 
JavaScript vulnerability analysis and mitigation

Summary

EntityAssigner.assign(), the implementation behind wrap(entity).assign(data), em.assign(entity, data), entity.assign(data) (via BaseEntity) and repository.assign(entity, data), writes keys that are not entity properties directly onto the entity instance, unless the onlyProperties option is enabled. A key named like a method of the entity therefore becomes an own property of the instance and replaces that method. For a toJSON key this disables the ORM serialization: JSON.stringify() only calls toJSON when it is a function, so with any other value in its place the entity is serialized as a plain object, with all of its own properties, including those marked as hidden. Nested payloads go through the same code path. With the default options, a nested object that carries the primary key of an already loaded to-one relation is assigned to that related entity, and the payload of an embedded property is assigned to the embeddable.

Impact

Applications are affected when they pass unvalidated user input (such as a request body) to one of the assign() APIs without onlyProperties: true, and then return the same entity instance in the response through JSON.stringify() (e.g. res.json(entity)). The response then contains the hidden properties, such as a password hash or internal fields, of:

  • the entity the data was assigned to,
  • its loaded to-one relations, when the payload carries the key for both the entity and the relation (together with the primary key of the related entity), and
  • its embeddables, when the payload carries the key for both the entity and the embeddable. When only the nested entity or the embeddable carries the key, serialization fails with an exception instead. Items of to-many collections are not disclosed. The replaced method stays on that entity instance for as long as it is kept in the EntityManager, so with a request-scoped EntityManager the effect ends with the request. The key is not persisted, and entities loaded through another EntityManager are not affected.

serialize(), wrap(entity).toObject(), em.create() and em.merge() are not affected. Related: GHSA-v5x2-6hgv-vwwv (same code path).

Affected versions

LinePackageAffected versions
v7@mikro-orm/core>= 7.0.0, <= 7.2.10
v6@mikro-orm/core<= 6.6.18

Patches

Fixed in 7.2.11 (#8771) and 6.6.19 (#8773). assign() now ignores keys that are not entity properties when they name a method of the entity.

Workarounds

  • Pass onlyProperties: true to assign(), or set it globally via the assign config option, or
  • map request data onto an explicit allow-list of fields before passing it to assign().

Source: NVD

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-133867CRITICAL9.1
  • JavaScript logoJavaScript
  • @fastify/express
NoYesNov 21, 2026
CVE-2026-133250CRITICAL9.1
  • JavaScript logoJavaScript
  • @fastify/middie
NoYesNov 21, 2026
CVE-2026-133120CRITICAL9.1
  • JavaScript logoJavaScript
  • @fastify/express
NoYesNov 21, 2026
CVE-2026-133312MEDIUM5.3
  • JavaScript logoJavaScript
  • @fastify/rate-limit
NoYesNov 21, 2026
CVE-2026-133273LOW3.7
  • JavaScript logoJavaScript
  • @fastify/swagger-ui
NoYesNov 21, 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