CVE-2022-33171Typeorm
Critical 9.8 No auth needed
Follow: this CVE · Typeorm · Typeorm We alert you by email or Slack (account required).
- 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
What to do
- Apply the vendor's security update for Typeorm.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How 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)
| Vendor | Product | Versions |
|---|---|---|
| typeorm | typeorm | < 0.3.0 |
Official sources
References
Links published by the sources. Open them with care.
- packetstormsecurity.com Exploit Third Party Advisory VDB Entry
- seclists.org Mailing List Third Party Advisory
- github.com Release Notes Third Party Advisory
- seclists.org Exploit Mailing List Third Party Advisory