Vulnerability · Published Jul 4, 2022 · Assigned by mitre
CVE-2022-33171
Critical 9.8
In plain English
A critical-severity security flaw in the typeorm package (npm). Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 21.4% (higher than 98% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | typeorm | 0.3.0 | GHSA-fx4w-v43j-vc45 |
Affected products (as reported)
References
- https://github.com/typeorm/typeorm/compare/0.2.45...0.3.0 x_refsource_MISC
- https://seclists.org/fulldisclosure/2022/Jun/51 x_refsource_MISC
- 20220815 Re: typeorm CVE-2022-33171 mailing-list, x_refsource_FULLDISC
- http://packetstormsecurity.com/files/168096/TypeORM-0.3.7-Information-Disclosure.html x_refsource_MISC