9.8critical
SQL injection in typeORM
- Severity
- 9.8critical CVSS:3.1 by NVD
- Exploit likelihood
- 2.00% (higher than 81% of CVEs)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-fx4w-v43j-vc45
Description
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
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| typeorm (npm) | before 0.3.0 | GitHub Advisory Database |
| typeorm typeorm | before 0.3.0 | NVD |
All scores
| GitHub | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 7.5high CVSS:2.0 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
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
GitHub Advisory Database
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.
NVD (es)
** EN DISPUTA ** La función findOne en TypeORM versiones anteriores a 0.3.0, puede recibir una cadena o un objeto FindOneOptions. Cuando la entrada a la función es un objeto JSON analizado controlado por el usuario, el suministro de un FindOneOptions diseñado en lugar de una cadena de identificación conlleva a una inyección SQL. NOTA: la posición del proveedor es que la aplicación del usuario es responsable de la comprobación de la entrada
References
| https://github.com/typeorm/typeorm/compare/0.2.45...0.3.0 | release-notes, third-party-advisory, web | |
| https://seclists.org/fulldisclosure/2022/Jun/51 | exploit, mailing-list, third-party-advisory, web | |
| http://seclists.org/fulldisclosure/2022/Aug/7 | mailing-list, third-party-advisory, web | |
| http://packetstormsecurity.com/files/168096/TypeORM-0.3.7-Information-Disclosure.html | exploit, third-party-advisory, vdb-entry, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-33171 | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-33171 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-fx4w-v43j-vc45 changed 2024-03-21 | CC-BY-4.0 |
| NVD | CVE-2022-33171 changed 2026-06-17 | Public domain |