CVE-2022-33171: The findOne function in TypeORM before 0.3.0 can either be supplied with a string or a FindOneOptions object
CVE-2022-33171 is a critical-severity flaw (CVSS 9.8) affecting typeorm. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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
Why this priority
- Critical severity
- EPSS top 2%: very likely to be exploited
- Public exploit reference
- Remotely exploitable, no login, no user action
A fixed release or distro patch exists.
Risk facts
| CVSS score | 9.8 (Critical) |
| Attack vector | Network (remote) |
| Attack complexity | Low |
| Privileges needed | None |
| User interaction | None |
| EPSS exploit chance | 21.4% (top 2%) |
| CISA exploited list | No |
| Weakness | CWE-89 |
| Published | 2022-07-04 |
| Last modified | 2026-06-17 |
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Exact fixes by distribution
Public exploits and detection
Public code exists for this CVE. Treat unpatched systems as at risk, and only run PoCs in a lab.
- GitHub PoC: open-flaw/CVE-2022-33171 (0 stars)
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2022-33171?
typeorm: upgrade to 0.3.0. Exact commands for each OS are on this page.
Is CVE-2022-33171 being exploited?
CVE-2022-33171 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2022-33171 affect?
CVE-2022-33171 affects typeorm. Severity is critical (CVSS 9.8). 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 lea
How urgent is CVE-2022-33171?
Priority 69/100. Critical severity; EPSS top 2%: very likely to be exploited; Public exploit reference; Remotely exploitable, no login, no user action
Related CVEs
- CVE-2020-8158 CRITICAL 9.8 UPGRADE Prototype pollution vulnerability in the TypeORM package < 0.2.25 may allow attackers to add or modify Object