Skip to main content
VulnerabilityPublished Updated

CVE-2026-73651: TypeORM · migration:generate template-literal code injection

Affects typeormSource GCVE Database

0

Mentioned vulnerabilities

CVSS 5.7 Medium : upgrade to 1.1.0 when convenient.

Data as of 26 Oct 2026, 16:10 UTC

CVSS 3.1 base score
5.7Medium
How severe the flaw is on the 0–10 CVSS scale.
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:N

What to do

Upgrade typeorm to 1.1.0.

Affected software

ProductAffectedFixed in
npmtypeormAffected
  • >=1.0.0 <1.1.0
Fixed in
  • 1.1.0

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

Community reviews

Loading reviews…