Vulnerability library
Security checkMarch 21, 2024

SQL injection in typeORM

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

High severitynpmtypeorm

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

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.

Recommendation

Update the typeorm package to the latest compatible version. Followings are version details:

  • Affected version(s): < 0.3.0
  • Patched version(s): 0.3.0

References

Could your website be exposed too?

SmartScanner can check your website for SQL injection in typeORM and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated March 21, 2024