cve.bz

CVE-2026-73651 typeorm typeorm: Code Injection

5.7 mediumEPSS 0.4%Fix available

Medium (5.7) in typeorm typeorm. EPSS 0.4% estimated probability of exploitation activity in the next 30 days. Fixed in typeorm 0.3.31, 1.1.0.

On this page
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.

Severity

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
EPSS
0.4% (unchanged from 0.4% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 34th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-08-14. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-94 Improper Control of Generation of Code (Code Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Awaiting analysis
Record from
the NVD, synced

Fix and patched versions

  • typeorm (npm): fixed in 0.3.31, 1.1.0

Ask an AI about this CVE

Show the promptExplain CVE-2026-73651 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-73651?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-73651?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-73651 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
typeorm< 0.3.31
typeorm>= 1.0.0, < 1.1.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-2rp8-mm9q-fp49npmtypeorm<0.3.310.3.31
GHSA-2rp8-mm9q-fp49npmtypeorm>=1.0.0 <1.1.01.1.0

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

TypeORM's migration:generate command builds JavaScript or TypeScript migration files by embedding database schema metadata, such as column comments and default values, into template literals. Prior to versions 0.3.31 and 1.1.0, this process escaped backticks but not ${...} template interpolation. An attacker who already holds write access to the database schema could place a malicious payload in a column's COMMENT or DEFAULT metadata; the payload executes as JavaScript when the generated migration file is later loaded via migration:run, import, or require.

This issue is rated Moderate. Exploitation requires an attacker to already have elevated, direct write access to the affected database schema, a condition not exposed through any Red Hat product's normal user-facing interfaces, and requires an administrator to subsequently run migration:generate against that compromised schema and load the resulting file. Red Hat's CVSS assessment matches the reporting vendor's own score.

Red Hat's mitigation

No mitigation is available beyond upgrading to a fixed TypeORM release (0.3.31 or 1.1.0 or later) when available for the affected product. In the meantime, administrators should restrict write access to production database schema metadata (table and column comments and default values) and review generated migration files before running migration:run, import, or require against them.

ProductPackageStateAdvisory
Red Hat Developer Hub 1rhdh/rhdh-hub-rhel9Fix deferred
Self-service automation portal 2ansible-automation-platform/automation-portalFix deferred
Self-service automation portal 2ansible-automation-platform/bootc-automation-portal-rhel9Fix deferred

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-73651.

Attack patterns (CAPEC)

  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
  • CAPEC-242 Code Injection Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON