Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2024-21512

Versions of the package mysql2 before 3.9.8 are vulnerable to Prototype Pollution due to improper user input sanitization passed to fields and tables when using nestTables.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-21512
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 18:23 UTC · Revision 1

Source evidence

CVE-2024-21512

core-osv · Original source

Published 29 May 2024, 05:00 UTC

Versions of the package mysql2 before 3.9.8 are vulnerable to Prototype Pollution due to improper user input sanitization passed to fields and tables when using nestTables.

osv:CVE-2024-21512
Complete source record
{
  "id": "30979e811dbd783ca6027a28c5d5ecbaa8a0fac301c79a2bf5fac09325c72197",
  "url": "https://osv.dev/vulnerability/CVE-2024-21512",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2024-21512",
    "summary": "Versions of the package mysql2 before 3.9.8 are vulnerable to Prototype Pollution due to improper user input sanitization passed to fields and tables when using nestTables.",
    "evidence": "osv:CVE-2024-21512",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2024-21512",
      "aliases": [
        "CVE-2024-21512",
        "GHSA-pmh2-wpjm-fj45"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L/E:P"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/sidorares/node-mysql2",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "f637d3fb8e3813e1110c475b1eedf75d24992581"
                },
                {
                  "fixed": "efe3db527a2c94a63c2d14045baba8dfefe922bc"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "3.9.8"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  },
                  {
                    "range": [
                      {
                        "fixed": "efe3db527a2c94a63c2d14045baba8dfefe922bc"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v3.9.7",
            "v3.9.6",
            "v3.9.5",
            "v3.9.4",
            "v3.9.3",
            "v3.9.2",
            "v3.9.1",
            "v3.9.0",
            "v3.8.0",
            "v3.7.1",
            "v3.7.0",
            "v3.6.5",
            "v3.6.4",
            "v3.6.3",
            "v3.6.2",
            "v3.6.1",
            "v3.6.0",
            "v3.5.2",
            "v3.5.1",
            "v3.5.0",
            "v3.4.5",
            "v3.4.4",
            "v3.4.3",
            "v3.4.2",
            "v3.4.1",
            "v3.4.0",
            "v3.3.5",
            "v3.3.4",
            "v3.3.3",
            "v3.3.2",
            "v3.3.1",
            "v3.3.0",
            "v3.2.4",
            "v3.2.3",
            "v3.2.2",
            "v3.2.1",
            "v3.2.0",
            "v3.1.2",
            "v3.1.1",
            "v3.1.0",
            "v3.0.1",
            "v3.0.0",
            "v3.0.0-rc.1",
            "v2.3.3",
            "v2.3.3-rc.0",
            "v2.3.2",
            "v2.3.1",
            "v2.3.0",
            "v2.2.5",
            "v2.2.4",
            "v2.2.3",
            "v2.2.2",
            "v2.2.1",
            "v2.2.0",
            "v2.1.0",
            "v1.6.5",
            "v2.0.2",
            "v2.0.1",
            "v2.0.0",
            "v2.0.0-alpha1",
            "v1.6.4",
            "v1.6.3",
            "v1.6.2",
            "v1.5.3",
            "v1.5.2",
            "v1.5.1",
            "v1.5.0",
            "v1.4.2",
            "v1.4.1",
            "v1.3.6",
            "v1.3.5",
            "v1.3.4",
            "v1.3.3",
            "v1.3.2",
            "v1.3.1",
            "v1.3.0",
            "v1.2.0",
            "v1.1.2",
            "v1.1.1",
            "v1.1.0",
            "v1.0.0",
            "v1.0.0-rc.12",
            "v1.0.0-rc.11",
            "v1.0.0-rc.10",
            "v1.0.0-rc.9",
            "v1.0.0-rc.8",
            "v1.0.0-rc.7",
            "v1.0.0-rc.6",
            "v1.0.0-rc.5",
            "v1.0.0-rc.4",
            "v1.0.0-rc.3",
            "v1.0.0-rc.2",
            "v0.15.8",
            "v0.15.7",
            "v0.15.6",
            "v0.15.5",
            "v0.15.4",
            "v0.15.3",
            "v0.15.2",
            "v0.15.1",
            "v0.15.0",
            "v0.14.1",
            "v0.14.0",
            "v0.13.0",
            "v0.12.5",
            "v0.12.4",
            "v0.12.3",
            "v0.12.2",
            "v0.12.1",
            "v0.12.0",
            "v0.11.7",
            "v0.11.6",
            "v0.11.5",
            "v0.9.2",
            "v0.8.20",
            "v0.8.19",
            "v0.8.18",
            "v0.8.17",
            "v0.8.16",
            "v0.8.15",
            "v0.8.14",
            "v0.8.13",
            "v0.8.11"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-21512.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:38.329614852Z",
      "provider": "osv",
      "references": [
        "https://gist.github.com/domdomi3/e9f0f9b9b1ed6bfbbc0bea87c5ca1e4a",
        "https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-7176010",
        "https://security.snyk.io/vuln/SNYK-JS-MYSQL2-6861580",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21512.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-21512",
        "https://github.com/sidorares/node-mysql2/commit/efe3db527a2c94a63c2d14045baba8dfefe922bc",
        "https://github.com/sidorares/node-mysql2/pull/2702"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-1321"
        ],
        "cna_assigner": "snyk",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "fixed": "*"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21512.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-21512",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 505631,
  "published_at": "2024-05-29T05:00:01.515+00:00"
}