CVE-2022-33171

Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in npm/typeorm

Identifiers

CVE-2022-33171

Package Slug

npm/typeorm

Vulnerability

Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

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 Versions

All versions before 0.3.0

Solution

Upgrade to version 0.3.0 or above.

Last Modified

2023-11-08

source