Summary
TypeORM: migration:generate template-literal code injection
Impact
Code injection / RCE. An attacker with DB schema write access executes arbitrary JavaScript on any machine that generates and loads the migration. This crosses the DB-to-host trust boundary.
CI/CD pipelines that auto-generate and run migrations are the highest-risk target. Any TypeORM user running migration:generate against a database with attacker-influenced schema metadata is affected.
Untrusted input is evaluated as executable code within the application's runtime environment. Typical impact: arbitrary code execution within the application's privilege context.
GHSA-2RP8-MM9Q-FP49 has a CVSS score of 5.7 (Medium). The vector is network-reachable, high privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.3.31, 1.1.0); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
typeorm to 0.3.31 or later; typeorm to 1.1.0 or later
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is GHSA-2RP8-MM9Q-FP49? GHSA-2RP8-MM9Q-FP49 is a medium-severity code injection vulnerability in typeorm (npm), affecting versions < 0.3.31. It is fixed in 0.3.31, 1.1.0. Untrusted input is evaluated as executable code within the application's runtime environment.
- How severe is GHSA-2RP8-MM9Q-FP49? GHSA-2RP8-MM9Q-FP49 has a CVSS score of 5.7 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of typeorm are affected by GHSA-2RP8-MM9Q-FP49? typeorm (npm) versions < 0.3.31 is affected.
- Is there a fix for GHSA-2RP8-MM9Q-FP49? Yes. GHSA-2RP8-MM9Q-FP49 is fixed in 0.3.31, 1.1.0. Upgrade to this version or later.
- Is GHSA-2RP8-MM9Q-FP49 exploitable, and should I be worried? Whether GHSA-2RP8-MM9Q-FP49 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-2RP8-MM9Q-FP49 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-2RP8-MM9Q-FP49?
- Upgrade
typeormto 0.3.31 or later - Upgrade
typeormto 1.1.0 or later
- Upgrade