Intel

AIKIDO-2026-509766

@mikro-orm/entity-generator is vulnerable to Path Traversal

GHSA-mfxv-v6q8-gfrxPublished Aug 5, 2026
August 5, 2026

20

CVE Score

Low

Path Traversal

Are you affected? Scan for Free

TL;DR

The entity generator derives output file names for native enum and routine source files from database-introspected type and routine names without the identifier escaping applied to entity class names. A name containing ../ is joined onto the configured output directory, so running generation against a schema a third party can write to writes files outside the intended path and can overwrite existing .ts files. Combined with the unescaped-literal flaw in the same package it can place injected executable TypeScript over a file the project already imports. The fix normalizes enum and routine names before using them as file names and confines generated files to the project or configured output directory.

How do I fix this?

Upgrade the @mikro-orm/entity-generator 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 you run the entity generator against a database schema in which an untrusted party can create native enum types or routines.

Versions

0.0.1 - 7.1.8

Fixed in 7.1.9

Background info

@mikro-orm/entity-generator is vulnerable to Path Traversal 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