What’s Vulnerable › Vulnerabilities
CVE-2024-21512
- Severity: high (CVSS 8.2 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 3.1% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-05-29 · updated 2026-06-17
- Weakness: CWE-1321
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.
Affected products
- Mysql2: before 3.9.8 — fixed in 3.9.8
How to fix
Upgrade to a fixed version: Mysql2 3.9.8. Check the vendor advisory for mitigations.
References
- 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
- 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
Get alerted when CVE-2024-21512 or the next vulnerability affects your stack