CVE-2022-33171
JSON

9.8critical

SQL injection in typeORM

Severity
9.8critical CVSS:3.1 by NVD
Exploit likelihood
2.00% (higher than 81% of CVEs)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-fx4w-v43j-vc45

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

Product or packageVersionsReported by
Unspecified productn/aCVE List
typeorm (npm)before 0.3.0GitHub Advisory Database
typeorm typeormbefore 0.3.0NVD

All scores

GitHub9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.5high CVSS:2.0AV:N/AC:L/Au:N/C:P/I:P/A:P

Classification

CWE-89

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

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

GitHub Advisory Database

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.

NVD (es)

** EN DISPUTA ** La función findOne en TypeORM versiones anteriores a 0.3.0, puede recibir una cadena o un objeto FindOneOptions. Cuando la entrada a la función es un objeto JSON analizado controlado por el usuario, el suministro de un FindOneOptions diseñado en lugar de una cadena de identificación conlleva a una inyección SQL. NOTA: la posición del proveedor es que la aplicación del usuario es responsable de la comprobación de la entrada

References

Sources

SourceRecordLicence
CVE ListCVE-2022-33171 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-fx4w-v43j-vc45 changed 2024-03-21CC-BY-4.0
NVDCVE-2022-33171 changed 2026-06-17Public domain