Description
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.
Recommendation
Update the typeorm package to the latest compatible version. Followings are version details:
Affected version(s): **>= 1.0.0, < 1.1.0 < 0.3.31** Patched version(s): **1.1.0 0.3.31**
References
Could your website be exposed too?
SmartScanner can check your website for TypeORM: migration:generate template-literal code injection and gives you actionable findings to investigate.
Start a free scanRelated Issues
- [Eclipse Theia] Indirect Prompt Injection via Auto-Loaded Workspace Prompt Template Files in AI Chat - @theia/ai-code-completion - CVE-2026-46580
- [Eclipse Theia] Indirect Prompt Injection via Auto-Loaded Workspace Prompt Template Files in AI Chat - @theia/ai-claude-code - CVE-2026-46580
- lodash vulnerable to Code Injection via `_.template` imports key names - lodash-amd - CVE-2026-4800
- lodash vulnerable to Code Injection via `_.template` imports key names - lodash-es - CVE-2026-4800


