Live threats

All CVEs / Typeorm

CVE-2022-33171Typeorm

Critical 9.8 No auth needed

Priority
74
CVSS 3.1
9.8
EPSS
2.0%
probability of exploitation in 30 days · percentile 81
Auth required
No
Published
Jul 4, 2022
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-89
SSVC (CISA)
Exploitation: proof of concept · Automatable: no · Technical impact: partial
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

What happens

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

Original NVD text.

What to do

  1. Apply the vendor's security update for Typeorm.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
npm typeorm < 0.3.0 0.3.0 npm install typeorm@0.3.0

Per OSV / GitHub Advisories (GHSA-fx4w-v43j-vc45). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
typeormtypeorm< 0.3.0

Official sources

References

Links published by the sources. Open them with care.