SQL Injection in Typeorm
CVE-2022-33171
- CVSS v3
- 9.8 Critical
- Public exploits
- 2 repositories
- EPSS
- 0.214 · 97.7th percentile
- Published
- 2022-07-04
The findOne function in TypeORM before 0.3.0 can either be supplied with a string or a FindOneOptions object. When input to the function is a user-controlled parsed JSON object, supplying a crafted FindOneOptions instead of an id string leads to SQL injection. NOTE: the vendor's position is that the user's application is responsible for input validation
Vulnerability class: SQL Injection
Published · last modified .
CVSS v3 metric
CVSS v3 base score 9.8 (Critical). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
- Attack Vector
- Network
AV:N - Attack Complexity
- Low
AC:L - Privileges Required
- None
PR:N - User Interaction
- None
UI:N - Scope
- Unchanged
S:U - Confidentiality
- High
C:H - Integrity
- High
I:H - Availability
- High
A:H
EPSS exploit prediction
EPSS 0.214, 97.7th percentile (last changed ); unchanged over 30 days. About EPSS.
Affected products
Weakness classification (CWE)
Public exploits and proof-of-concept code
2 public repositories with exploit or proof-of-concept code for this CVE:
- dajneem23/CVE-2022-33171 (last pushed 2025-12-08): CVE-2022-33171: TypeORM SQL Injection Vulnerability
- open-flaw/CVE-2022-33171 (last pushed 2025-12-08): CVE-2022-33171: TypeORM SQL Injection Vulnerability
References
- github.com/typeorm/typeorm/compare/0.2.45...0.3.0 (Third Party Advisory, Release Notes)
- seclists.org/fulldisclosure/2022/Jun/51 (Exploit, Mailing List, Third Party Advisory)
- 20220815 Re: typeorm CVE-2022-33171 (mailing-list, Mailing List, Third Party Advisory)
- packetstormsecurity.com/files/168096/TypeORM-0.3.7-Information-Disclosure.html (Exploit, VDB Entry, Third Party Advisory)
This CVE has public exploit evidence. See the latest CVEs with public exploits.