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

- Severity: Medium 5.7 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.23%, higher than 15% of CVEs (2026-12-01)
- Published: 2026-07-21T21:59:23.000Z
- Modified: 2026-09-18T20:05:53.723Z
- Also known as: GHSA-2rp8-mm9q-fp49
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- typeorm typeorm: < 0.3.31; >= 1.0.0, < 1.1.0
- typeorm (npm): before 0.3.31; from 1.0.0 before 1.1.0

## Every score

- GitHub_M: CVSS:3.1 5.7 Medium `CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N`
- GitHub: CVSS:3.1 5.7 Medium `CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N`

## References

- <https://github.com/typeorm/typeorm/security/advisories/GHSA-2rp8-mm9q-fp49> (web)
- <https://github.com/typeorm/typeorm/commit/41d1c62fe49f99c3ca916d4d986f61ee9f45d519> (web)
- <https://github.com/typeorm/typeorm/commit/b175f9b8be422edd2a2ac035ba90c3f2ce782dfe> (web)
- <https://github.com/typeorm/typeorm/releases/tag/0.3.31> (web)
- <https://github.com/typeorm/typeorm/releases/tag/1.1.0> (web)
- <https://github.com/typeorm/typeorm> (package)

## Sources

- CVE List: [CVE-2026-73651](https://www.cve.org/CVERecord?id=CVE-2026-73651), CVE Terms of Use, modified 2026-08-14
- GitHub Advisory Database: [GHSA-2rp8-mm9q-fp49](https://github.com/advisories/GHSA-2rp8-mm9q-fp49), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-73651](https://nvd.nist.gov/vuln/detail/CVE-2026-73651), Public domain, modified 2026-09-18

---

Page: https://cve.day/CVE-2026-73651 · Whole record: https://cve.day/CVE-2026-73651.json · Rebuilt by cve.day 2026-11-25T22:59:32.824Z
