CVE-2026-73651
Received Received - Intake

Code Injection in TypeORM Migration Generation

Vulnerability report for CVE-2026-73651, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-13

Last updated on: 2026-08-13

Assigner: GitHub, Inc.

Description

TypeORM is a TypeScript and JavaScript ORM for Node.js that supports PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, Oracle, and other databases. Prior to versions 0.3.31 and 1.1.0, typeorm migration:generate embeds database schema metadata into JavaScript or TypeScript template literals in src/commands/MigrationGenerateCommand.ts, escaping backticks but not ${...} interpolation. An attacker with database schema write access can place a payload in column COMMENT or DEFAULT metadata, or another introspected schema string, and the JavaScript engine evaluates the payload when the generated migration is loaded through migration:run, import, or require. This issue is fixed in versions 0.3.31 and 1.1.0.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-13
Last Modified
2026-08-13
Generated
2026-08-14
AI Q&A
2026-08-13
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
typeorm typeorm to 1.1.0 (exc)
typeorm typeorm From 1.0.0 (inc) to 1.1.0 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-73651 is a code injection vulnerability in TypeORM versions below 0.3.31 and between 1.0.0 and 1.1.0. The issue occurs in the migration:generate command, which embeds database schema metadata into JavaScript/TypeScript template literals without properly escaping ${...} expressions. An attacker with write access to the database can inject malicious payloads into schema metadata like column comments or defaults. When the generated migration file is executed, the JavaScript engine evaluates the unescaped ${...} as live code, leading to arbitrary code execution.

Detection Guidance

To detect this vulnerability, check if your TypeORM version is below 0.3.31 or between 1.0.0 and 1.1.0. Run: npm list typeorm or yarn list typeorm. Inspect migration files generated with migration:generate for unescaped ${...} in template literals or malicious payloads in column comments or defaults.

Impact Analysis

This vulnerability allows an attacker with database schema write access to execute arbitrary code on the host system when migrations are run. This poses a high risk for CI/CD pipelines that auto-generate and run migrations, as it enables attackers to run commands with the privileges of the user executing the migration. The impact includes potential data breaches, system compromise, or unauthorized access to sensitive information.

Compliance Impact

This vulnerability could lead to unauthorized data access or modification, violating GDPR's integrity and confidentiality principles or HIPAA's security requirements. Organizations using affected TypeORM versions may face compliance violations, legal penalties, or reputational damage due to potential data breaches or unauthorized system access.

Mitigation Strategies

Upgrade TypeORM to version 0.3.31 or 1.1.0 or later. Review and regenerate all migrations using the patched version. Audit database schema metadata for suspicious payloads in column comments, defaults, or view definitions before migration execution.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-73651. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart