CVE-2024-21509
MEDIUM 6.5CVSS 3.1mysql2 vulnerable to Prototype Poisoning
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.
- Published
- 10 Apr 2024
- Last modified
- 10 Sep 2026
- Assigned by
- report@snyk.io
- NVD status
- Analyzed
- Weakness
- CWE-1321
- Also known as
- GHSA-49j4-86m8-q2jw
- Sources
- NVDJSONOSV GHSA-49j4-86m8-q2jwJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | 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 | |
| NVD | report@snyk.io (Secondary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | sidorares | mysql2cpe:2.3:a:sidorares:mysql2:*:*:*:*:*:*:*:* |
< 3.9.4 | 3.9.4 |
| OSV | npm | mysql2 | < 3.9.4 | 3.9.4 |
References
- https://blog.slonser.info/posts/mysql2-attacker-configuration/ · Exploit, Permissions Required, WEB
- 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://security.snyk.io/vuln/SNYK-JS-MYSQL2-6591084 · Exploit, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-21509 · ADVISORY
- https://github.com/sidorares/node-mysql2 · PACKAGE
History
- 25 Nov 2026 20:55 UTC · NVD: first stored (published 10 Apr 2024)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 10 Apr 2024)