GHSA-2v7q-2xqx-f4q5
Potential SQL Injection in sequelize
Quick fix
GHSA-2v7q-2xqx-f4q5 — sequelize: upgrade to the fixed version with the command below.
npm install sequelize@3.0.0Details
Affected versions of `sequelize` are vulnerable to SQL Injection when user input is passed into `findOne` or into a statement such as `where: "user input"`.
## Recommendation
Update to version 3.0.0 or later.
Version 3.0.0 will introduce a number of breaking changes. Thankfully, the project authors have provided a 2.x -> 3.x [upgrade guide](https://github.com/sequelize/sequelize/wiki/Upgrade-from-2.0-to-3.0) to ease this transition.
If upgrading is not an option, it is also possible to mitigate this by ensuring that all uses of `where: "input"` and `findOne("input")` are properly sanitized, such as by the use of a wrapper function.
Are you affected?
Enter the version of the package you're using.
Affected packages
References
Check it before you install it
One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.
curl -s https://vdb.ai.kr/v1/ai/check-packages \
-H 'Content-Type: application/json' \
-d '{"packages":["pkg:npm/sequelize"]}'