PT-2022-21720 · Typeorm · Typeorm

Lixts

·

Published

2022-07-01

·

Updated

2024-08-03

·

CVE-2022-33171

CVSS v3.1

9.8

Critical

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions TypeORM versions prior to 0.3.0
Description The findOne function in TypeORM can be supplied with either a string or a FindOneOptions object. When the input to the function is a user-controlled parsed JSON object, supplying a crafted FindOneOptions instead of an id string leads to SQL injection. The vendor's position is that the user's application is responsible for input validation.
Recommendations For TypeORM versions prior to 0.3.0, ensure that the input to the findOne function is properly validated to prevent SQL injection. As a temporary workaround, consider validating the input to ensure it is a string or a properly formatted FindOneOptions object before passing it to the findOne function. At the moment, there is no information about a newer version that contains a fix for this vulnerability.

Exploit

SQL injection

Weakness Enumeration

Related Identifiers

CVE-2022-33171
GHSA-FX4W-V43J-VC45

Affected Products

Typeorm