{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "0.3.31"
              },
              {
                "introduced": "1.0.0"
              },
              {
                "fixed": "1.1.0"
              }
            ],
            "source": [
              "AFFECTED_FIELD",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "introduced": "cf3f13f2edb4c3a88e2ec836af72e3249c59e41e"
            },
            {
              "fixed": "797320375fb83b2e9af4a6455e0b1b4483be329d"
            },
            {
              "fixed": "8748b1be17bf93fc9b62b3444e411e9055e9e017"
            },
            {
              "fixed": "41d1c62fe49f99c3ca916d4d986f61ee9f45d519"
            },
            {
              "fixed": "b175f9b8be422edd2a2ac035ba90c3f2ce782dfe"
            }
          ],
          "repo": "https://github.com/typeorm/typeorm",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-2rp8-mm9q-fp49"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-94"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/73xxx/CVE-2026-73651.json"
  },
  "details": "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.",
  "id": "CVE-2026-73651",
  "modified": "2026-08-16T03:31:11.863780128Z",
  "published": "2026-08-13T18:11:14.613Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/typeorm/typeorm/releases/tag/0.3.31"
    },
    {
      "type": "WEB",
      "url": "https://github.com/typeorm/typeorm/releases/tag/1.1.0"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/73xxx/CVE-2026-73651.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/typeorm/typeorm/security/advisories/GHSA-2rp8-mm9q-fp49"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-73651"
    },
    {
      "type": "FIX",
      "url": "https://github.com/typeorm/typeorm/commit/41d1c62fe49f99c3ca916d4d986f61ee9f45d519"
    },
    {
      "type": "FIX",
      "url": "https://github.com/typeorm/typeorm/commit/b175f9b8be422edd2a2ac035ba90c3f2ce782dfe"
    }
  ],
  "schema_version": "1.9.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "TypeORM: migration:generate template-literal code injection"
}