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
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.
Link | Tags |
---|---|
https://github.com/typeorm/typeorm/compare/0.2.45...0.3.0 | third party advisory release notes |
https://seclists.org/fulldisclosure/2022/Jun/51 | mailing list third party advisory exploit |
http://seclists.org/fulldisclosure/2022/Aug/7 | third party advisory mailing list |
http://packetstormsecurity.com/files/168096/TypeORM-0.3.7-Information-Disclosure.html | third party advisory vdb entry exploit |