CVE-2026-73651: TypeORM · migration:generate template-literal code injection
Affects typeormSource GCVE Database
Mentioned vulnerabilities
CVSS 5.7 Medium : upgrade to 1.1.0 when convenient.
Data as of 26 Oct 2026, 16:10 UTC
- Patch
- Available – fixed in 1.1.0
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:NWhat to do
Upgrade typeorm to 1.1.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmtypeorm | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
If you cannot patch yet, avoid running migration:generate on databases where untrusted users can write schema metadata containing `${...}` sequences. Review and sanitize schema metadata inputs to prevent injection.
Description
TypeORM's migration:generate command embeds database schema metadata into JavaScript/TypeScript template literals without properly escaping template interpolation syntax `${...}`. This allows an attacker who can write schema metadata such as column comments or defaults to inject arbitrary code that executes when the generated migration file is loaded. The vulnerability affects TypeORM versions before 0.3.31 and versions from 1.0.0 up to but not including 1.1.0.
References
- github.com/typeorm/typeorm/security/advisories/GHSA-2rp8-mm9q-fp49 (opens in a new tab)
- github.com/typeorm/typeorm/commit/41d1c62fe49f99c3ca916d4d986f61ee9f45d519 (opens in a new tab)
- github.com/typeorm/typeorm/commit/b175f9b8be422edd2a2ac035ba90c3f2ce782dfe (opens in a new tab)
- github.com/typeorm/typeorm (opens in a new tab)
- github.com/typeorm/typeorm/releases/tag/0.3.31 (opens in a new tab)
- github.com/typeorm/typeorm/releases/tag/1.1.0 (opens in a new tab)