CVE-2024-21512
published high CVSS 3.1 · 8.2mysql2: vulnerable to Prototype Pollution due to improper user input sanitization
Package status and fixes
Description
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 8.2 / 10
- Severity
- high
- Provider
- snyk · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L/E:P
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| n/a | mysql2 | 0 to < 3.9.8 (affected · semver) | snyk · cna |
| n/a | org.webjars.npm:mysql2 | 0 and later (affected · semver) | snyk · cna |
| mysql2 | mysql2 | 0 to < 3.9.8 (affected · custom)Default: unknown | CISA-ADP · adp |
Weaknesses
1- CWE-1321 Prototype Pollution
References
5- https://gist.github.com/domdomi3/e9f0f9b9b1ed6bfbbc0bea87c5ca1e4a
- https://github.com/sidorares/node-mysql2/commit/efe3db527a2c94a63c2d14045baba8dfefe922bc
- https://github.com/sidorares/node-mysql2/pull/2702
- https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-7176010
- https://security.snyk.io/vuln/SNYK-JS-MYSQL2-6861580
Provider assertions
3snyk · cna
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- c811f10dd86341507df70ba627afc072a09abc48142cd96d0e626ac3bc4bffd6
- Ingested
- 23 Sep 2026, 08:19:02 UTC
- Source record
- Official CVE record