GHSA-M9JW-237R-GVFV

Vulnerability from github – Published: 2019-10-25 19:43 – Updated: 2023-09-11 22:39
VLAI?
Summary
SQL Injection in sequelize
Details

Affected versions of sequelize are vulnerable to SQL Injection. The function sequelize.json() incorrectly formatted sub paths for JSON queries, which allows attackers to inject SQL statements and execute arbitrary SQL queries if user input is passed to the query. Exploitation example:

return User.findAll({
  where: this.sequelize.json("data.id')) AS DECIMAL) = 1 DELETE YOLO INJECTIONS; -- ", 1)
});

Recommendation

If you are using sequelize 5.x, upgrade to version 5.15.1 or later. If you are using sequelize 4.x, upgrade to version 4.44.3 or later.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "sequelize"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "4.44.3"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "npm",
        "name": "sequelize"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "5.0.0"
            },
            {
              "fixed": "5.15.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2019-10752"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-89"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2019-10-22T15:53:58Z",
    "nvd_published_at": null,
    "severity": "CRITICAL"
  },
  "details": "Affected versions of `sequelize` are vulnerable to SQL Injection. The function `sequelize.json()` incorrectly formatted sub paths for JSON queries, which allows attackers to inject SQL statements and execute arbitrary SQL queries if user input is passed to the query.  Exploitation example:  \n\n```js\nreturn User.findAll({\n  where: this.sequelize.json(\"data.id\u0027)) AS DECIMAL) = 1 DELETE YOLO INJECTIONS; -- \", 1)\n});\n```\n\n\n## Recommendation\n\nIf you are using `sequelize` 5.x, upgrade to version 5.15.1 or later.\nIf you are using `sequelize` 4.x, upgrade to version 4.44.3 or later.",
  "id": "GHSA-m9jw-237r-gvfv",
  "modified": "2023-09-11T22:39:40Z",
  "published": "2019-10-25T19:43:16Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2019-10752"
    },
    {
      "type": "WEB",
      "url": "https://github.com/sequelize/sequelize/pull/11329"
    },
    {
      "type": "WEB",
      "url": "https://github.com/sequelize/sequelize/commit/9bd0bc1,"
    },
    {
      "type": "WEB",
      "url": "https://github.com/sequelize/sequelize/commit/9bd0bc111b6f502223edf7e902680f7cc2ed541e"
    },
    {
      "type": "WEB",
      "url": "https://snyk.io/vuln/SNYK-JS-SEQUELIZE-459751"
    },
    {
      "type": "WEB",
      "url": "https://snyk.io/vuln/SNYK-JS-SEQUELIZE-459751,"
    },
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/1146"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "SQL Injection in sequelize"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…