Skip to content

SQL injection in typeORM

Critical severity GitHub Reviewed Published Jul 5, 2022 to the GitHub Advisory Database • Updated Mar 21, 2024

Package

npm typeorm (npm)

Affected versions

< 0.3.0

Patched versions

0.3.0

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.

References

Published by the National Vulnerability Database Jul 4, 2022
Published to the GitHub Advisory Database Jul 5, 2022
Reviewed Mar 21, 2024
Last updated Mar 21, 2024

Severity

Critical
9.8
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Weaknesses

CVE ID

CVE-2022-33171

GHSA ID

GHSA-fx4w-v43j-vc45

Source code

No known source code
Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.