{"id":"CVE-2022-33171","aliases":["EUVD-2022-6336","GHSA-fx4w-v43j-vc45"],"status":"disputed","title":"SQL injection in typeORM","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","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-10","score":0.21393,"percentile":0.97626,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-89"],"published":"2022-07-04T15:51:49Z","modified":"2026-10-28T02:30:55Z","exploits":[{"source":"pocgithub","id":"open-flaw/CVE-2022-33171","title":"open-flaw/CVE-2022-33171","date":"2025-12-08","url":"https://github.com/open-flaw/CVE-2022-33171"}],"fixes":[{"ecosystem":"npm","package":"typeorm","fixed_in":["0.3.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"typeorm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.3.0"}]}]},{"source":"osv","ecosystem":"npm","package":"typeorm","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.3.0"}]}]}],"products":[{"vendor":"typeorm","product":"typeorm"}],"references":[{"url":"https://github.com/typeorm/typeorm/compare/0.2.45...0.3.0","tags":["x_refsource_MISC","x_transferred","Release Notes","Third Party Advisory","web"]},{"url":"https://seclists.org/fulldisclosure/2022/Jun/51","tags":["x_refsource_MISC","x_transferred","Exploit","Mailing List","Third Party Advisory","web"]},{"url":"http://seclists.org/fulldisclosure/2022/Aug/7","tags":["mailing-list","x_refsource_FULLDISC","x_transferred","Mailing List","Third Party Advisory","article","web"]},{"url":"http://packetstormsecurity.com/files/168096/TypeORM-0.3.7-Information-Disclosure.html","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","VDB Entry","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-33171","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-fx4w-v43j-vc45"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/33xxx/CVE-2022-33171.json","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2022-33171","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","status":"disputed","published":"2022-07-04T15:51:49Z","modified":"2024-08-03T08:01:20.214Z","updated_at":"2026-11-02T14:34:40.621895Z"}],"euvd":[{"id":"EUVD-2022-6336","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","status":"published","published":"2022-07-04T15:51:49Z","modified":"2024-08-03T08:01:20Z","updated_at":"2026-11-03T03:25:30.400668Z"}],"ghsa":[{"id":"GHSA-fx4w-v43j-vc45","title":"SQL injection in typeORM","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.","status":"published","published":"2022-07-05T00:00:54Z","modified":"2024-03-21T18:57:33Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:37:41.821668Z"}],"nvd":[{"id":"CVE-2022-33171","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","status":"disputed","published":"2022-07-04T16:15:08.757Z","modified":"2026-06-17T04:48:32.313Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:07:22.966735Z"}],"osv":[{"id":"GHSA-fx4w-v43j-vc45","title":"SQL injection in typeORM","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.","status":"published","published":"2022-07-05T00:00:54Z","modified":"2024-03-21T19:12:58.107504Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T15:46:47.119724Z"},{"id":"CVE-2022-33171","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","status":"published","published":"2022-07-04T15:51:49Z","modified":"2026-10-28T02:30:55.354257079Z","updated_at":"2026-11-02T15:44:25.860945Z"}]}}
