
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2022-33171 affects TypeORM before version 0.3.0. The vulnerability exists in the findOne function, which can accept either a string or a FindOneOptions object as input. When the function receives a user-controlled parsed JSON object, supplying a crafted FindOneOptions instead of an id string can lead to SQL injection (MITRE CVE, NVD). This vulnerability is disputed as the vendor's position is that the user's application is responsible for input validation.
The vulnerability exists in the findOne and findOneOrFail methods of TypeORM. These methods are designed to accept either a string ID or a FindOneOptions object. When user-controlled input is passed as a JSON object, it can be interpreted as FindOneOptions instead of a simple ID string, allowing for SQL injection through crafted where clauses (FullDisclosure). The issue was addressed in version 0.3.0 by changing the API design of these methods.
When exploited, this vulnerability could allow attackers to perform SQL injection attacks against applications using TypeORM. This could lead to unauthorized data access, data manipulation, or execution of arbitrary SQL commands on the underlying database (FullDisclosure).
The primary mitigation is to upgrade to TypeORM version 0.3.0 or later, which addresses this issue through API changes. For systems that cannot upgrade, proper input validation should be implemented to ensure that only expected ID strings are passed to the findOne and findOneOrFail methods (MITRE CVE).
The vulnerability has been disputed by the vendor, who maintains that proper input validation is the responsibility of the application developer. This position has been supported by some security firms, including Snyk, who took the author's position on the matter (FullDisclosure).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."