{"id":"CVE-2026-73651","state":"PUBLISHED","title":"TypeORM: migration:generate template-literal code injection","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.","publishedAt":"2026-08-13T18:11:14.613Z","updatedAt":"2026-08-14T18:09:07.215Z","severity":{"score":5.7,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N","source":"GitHub_M"},"assigner":"GitHub_M","products":["typeorm typeorm"],"affected":[{"vendor":"typeorm","product":"typeorm","versions":[{"version":"< 0.3.31","status":"affected"},{"version":">= 1.0.0, < 1.1.0","status":"affected"}]}],"references":["https://github.com/typeorm/typeorm/security/advisories/GHSA-2rp8-mm9q-fp49","https://github.com/typeorm/typeorm/commit/41d1c62fe49f99c3ca916d4d986f61ee9f45d519","https://github.com/typeorm/typeorm/commit/b175f9b8be422edd2a2ac035ba90c3f2ce782dfe","https://github.com/typeorm/typeorm/releases/tag/0.3.31","https://github.com/typeorm/typeorm/releases/tag/1.1.0"],"weaknesses":["CWE-94"],"ingestedAt":"2026-10-29T20:12:58.252Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/73xxx/CVE-2026-73651.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-73651","state":"PUBLISHED","datePublished":"2026-08-13T18:11:14.613Z","dateUpdated":"2026-08-14T18:09:07.215Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-08-13T14:04:09.604Z"},"containers":{"cna":{"title":"TypeORM: migration:generate template-literal code injection","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"typeorm","product":"typeorm","versions":[{"version":"< 0.3.31","status":"affected"},{"version":">= 1.0.0, < 1.1.0","status":"affected"}]}],"references":[{"url":"https://github.com/typeorm/typeorm/security/advisories/GHSA-2rp8-mm9q-fp49","name":"https://github.com/typeorm/typeorm/security/advisories/GHSA-2rp8-mm9q-fp49","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/typeorm/typeorm/commit/41d1c62fe49f99c3ca916d4d986f61ee9f45d519","name":"https://github.com/typeorm/typeorm/commit/41d1c62fe49f99c3ca916d4d986f61ee9f45d519","tags":["x_refsource_MISC"]},{"url":"https://github.com/typeorm/typeorm/commit/b175f9b8be422edd2a2ac035ba90c3f2ce782dfe","name":"https://github.com/typeorm/typeorm/commit/b175f9b8be422edd2a2ac035ba90c3f2ce782dfe","tags":["x_refsource_MISC"]},{"url":"https://github.com/typeorm/typeorm/releases/tag/0.3.31","name":"https://github.com/typeorm/typeorm/releases/tag/0.3.31","tags":["x_refsource_MISC"]},{"url":"https://github.com/typeorm/typeorm/releases/tag/1.1.0","name":"https://github.com/typeorm/typeorm/releases/tag/1.1.0","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":5.7,"baseSeverity":"MEDIUM","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"HIGH","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-94","lang":"en","description":"CWE-94: Improper Control of Generation of Code ('Code Injection')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-08-13T18:11:14.613Z"},"source":{"advisory":"GHSA-2rp8-mm9q-fp49","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-08-14T17:53:43.799793Z","id":"CVE-2026-73651","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-08-14T18:09:07.215Z"}}]}}}