SQL Injection in typeorm
Summary
GHSA-w7q7-vjp8-7jv4: SQL Injection in typeorm. Affects typeorm versions < 0.1.15. Fixed in 0.1.15. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The typeorm package is an Object Relational Mapping (ORM) library for TypeScript and JavaScript. It provides a set of tools and utilities to interact with databases, allowing developers to easily manage database operations. However, versions of typeorm before 0.1.15 are vulnerable to SQL Injection.
Vulnerability Detail
The vulnerability in typeorm arises from improper validation of field names, which allows attackers to inject SQL statements and execute arbitrary SQL queries. This can lead to unauthorized access, data manipulation, or even complete compromise of the database. The vulnerability has a severity rating of HIGH and is classified under CWE-89.
How To Fix
Latest published version: 1.1.2 as of 22 Oct 2026
npm install typeorm@1.1.2
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
0.1.15
This is the first release that contains the fix.
npm install typeorm@0.1.15
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Conclusion
In conclusion, the typeorm package before version 0.1.15 is vulnerable to SQL Injection. It is crucial to upgrade to the latest version to mitigate this vulnerability and ensure the security of your application. For further support on vulnerability remediation, you can reach out to DevNack.com.
See every vulnerability recorded for typeorm →
FAQ
typeorm is an Object Relational Mapping (ORM) library for TypeScript and JavaScript, providing tools and utilities to interact with databases.
SQL Injection is a type of security vulnerability where an attacker can manipulate SQL queries by injecting malicious SQL code. This can lead to unauthorized access, data manipulation, or even complete compromise of the database.
The impact of this vulnerability can be severe, as it allows attackers to execute arbitrary SQL queries. This can lead to unauthorized access, data manipulation, or even complete compromise of the database.
You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply upload your package-lock.json file and it will alert you in real-time for any open-source vulnerabilities, including this one.
The recommended solution is to upgrade to version 0.1.15 of typeorm. This version includes the necessary fixes to prevent SQL Injection. There are no known workarounds for this vulnerability.
References
Related vulnerabilities
Recent vulnerabilities recorded for typeorm.