GHSA-2v7q-2xqx-f4q5

Suggest an improvement
Source
https://github.com/advisories/GHSA-2v7q-2xqx-f4q5
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2019/02/GHSA-2v7q-2xqx-f4q5/GHSA-2v7q-2xqx-f4q5.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-2v7q-2xqx-f4q5
Aliases
Published
2019-02-18T23:54:32Z
Modified
2023-11-08T03:58:12.201688Z
Summary
Potential SQL Injection in sequelize
Details

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 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.

Database specific
{
    "nvd_published_at": null,
    "cwe_ids": [
        "CWE-89"
    ],
    "severity": "HIGH",
    "github_reviewed": true,
    "github_reviewed_at": "2020-06-16T20:53:00Z"
}
References

Affected packages

npm / sequelize

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
3.0.0

Database specific

{
    "last_known_affected_version_range": "<= 2.1.3"
}