CVE-2022-33171: SQL Injection

Published Jul 4, 2022
·
Updated

DISPUTED 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 Software

2 affected componentsFixes available
npm/typeorm<0.3.0
0.3.0
TypeORM Typeorm Node.js<0.3.0

Event History

Jul 4, 2022
CVE Published
via MITRE·03:51 PM
Data Sourced
via MITRE·03:51 PM
Description
Disputed
04:15 PM
Jul 5, 2022
Advisory Published
via GitHub·12:00 AM

Frequently Asked Questions

1

Which applications are exposed to this issue?

Applications using TypeORM versions before 0.3.0 may be exposed if they pass user-controlled parsed JSON directly to findOne where an ID string is expected. The reported issue depends on the application allowing a caller to supply a crafted FindOneOptions object instead.

2

Does an attacker need authentication or user interaction?

The supplied CVSS vector indicates network exploitation with low attack complexity, no privileges required, and no user interaction. In practice, the vulnerable application path must accept attacker-controlled JSON and pass it to findOne without appropriate input validation.

3

Is this considered a confirmed TypeORM vulnerability?

The issue is marked disputed. The vendor position stated in the advisory is that applications are responsible for validating input before it reaches findOne.

4

What can be done if upgrading is not immediately possible?

Do not pass user-controlled parsed JSON objects directly to findOne. Validate that values intended as identifiers are strings and reject or transform unexpected object input before calling the function.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203