Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. typeorm
  4. ›
  5. GHSA-2rp8-mm9q-fp49

GHSA-2rp8-mm9q-fp49: TypeORM: migration:generate template-literal code injection

July 21, 2026

typeorm migration:generate embeds database schema metadata into JS/TS template literals, escaping backticks but not ${...}. An attacker who can write schema metadata (column comments, defaults, view definitions) achieves arbitrary code execution on the host that loads the generated migration.

References

  • github.com/advisories/GHSA-2rp8-mm9q-fp49
  • github.com/typeorm/typeorm/commit/41d1c62fe49f99c3ca916d4d986f61ee9f45d519
  • github.com/typeorm/typeorm/commit/b175f9b8be422edd2a2ac035ba90c3f2ce782dfe
  • github.com/typeorm/typeorm/releases/tag/0.3.31
  • github.com/typeorm/typeorm/releases/tag/1.1.0
  • github.com/typeorm/typeorm/security/advisories/GHSA-2rp8-mm9q-fp49

Code Behaviors & Features

Detect and mitigate GHSA-2rp8-mm9q-fp49 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.3.31, all versions starting from 1.0.0 before 1.1.0

Fixed versions

  • 0.3.31
  • 1.1.0

Solution

Upgrade to versions 0.3.31, 1.1.0 or above.

Impact 5.7 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

npm/typeorm/GHSA-2rp8-mm9q-fp49.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:17:02 +0000.