6.5medium
mysql2 vulnerable to Prototype Poisoning
- Severity
- 6.5medium CVSS:3.1 by snyk
- Exploit likelihood
- 0.95% (higher than 62% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- snyk
- Also known as
- GHSA-49j4-86m8-q2jw
Description
Versions of the package mysql2 before 3.9.4 are vulnerable to Prototype Poisoning due to insecure results object creation and improper user input sanitization passed through parserFn in text_parser.js and binary_parser.js.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| mysql2 | before 3.9.4 | CVE List |
| mysqljs mysql2 | before 3.9.4 | CVE List |
| mysql2 (npm) | before 3.9.4 | GitHub Advisory Database |
| sidorares mysql2 | before 3.9.4 | NVD |
All scores
| snyk | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L/E:P |
| GitHub | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.
What each source says
CVE List
Versions of the package mysql2 before 3.9.4 are vulnerable to Prototype Poisoning due to insecure results object creation and improper user input sanitization passed through parserFn in text_parser.js and binary_parser.js.
GitHub Advisory Database
Versions of the package mysql2 before 3.9.4 are vulnerable to Prototype Poisoning due to insecure results object creation and improper user input sanitization passed through parserFn in text_parser.js and binary_parser.js.
NVD (es)
Las versiones del paquete mysql2 anteriores a la 3.9.4 son vulnerables al envenenamiento de prototipos debido a la creación insegura de objetos de resultados y a una desinfección inadecuada de las entradas del usuario pasadas a través de parserFn en text_parser.js y binario_parser.js.
References
| https://security.snyk.io/vuln/SNYK-JS-MYSQL2-6591084 | exploit, third-party-advisory, web | |
| https://blog.slonser.info/posts/mysql2-attacker-configuration/ | exploit, permissions-required | |
| https://github.com/sidorares/node-mysql2/blob/fd3d117da82cc5c5fa5a3701d7b33ca77691bc61/lib/parsers/text_parser.js%23L134 | broken-link, web | |
| https://github.com/sidorares/node-mysql2/commit/4a964a3910a4b8de008696c554ab1b492e9b4691 | patch, web | |
| https://github.com/sidorares/node-mysql2/pull/2574 | exploit, issue-tracking, web | |
| https://github.com/sidorares/node-mysql2/releases/tag/v3.9.4 | release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2024-21509 | advisory | |
| https://blog.slonser.info/posts/mysql2-attacker-configuration | web | |
| https://github.com/sidorares/node-mysql2 | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-21509 changed 2024-08-22 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-49j4-86m8-q2jw changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2024-21509 changed 2026-06-17 | Public domain |