CVE-2024-21509
published medium CVSS 3.1 · 6.5mysql2: Prototype Poisoning
Package status and fixes
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.
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
- 6.5 / 10
- Severity
- medium
- Provider
- snyk · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/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.4 (affected · semver) | snyk · cna |
| mysqljs | mysql2 | 0 to < 3.9.4 (affected · custom)Default: unknown | CISA-ADP · adp |
Weaknesses
2- CWE-1321 Prototype Poisoning
- CWE-1321 CWE-1321 Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
References
6- https://blog.slonser.info/posts/mysql2-attacker-configuration/
- https://github.com/sidorares/node-mysql2/blob/fd3d117da82cc5c5fa5a3701d7b33ca77691bc61/lib/parsers/text_parser.js%23L134
- https://github.com/sidorares/node-mysql2/commit/4a964a3910a4b8de008696c554ab1b492e9b4691
- https://github.com/sidorares/node-mysql2/pull/2574
- https://github.com/sidorares/node-mysql2/releases/tag/v3.9.4
- https://security.snyk.io/vuln/SNYK-JS-MYSQL2-6591084
Provider assertions
3snyk · cna
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- f8085b29c3dfb3202e97040537e6e50cb14059af80c94ad24e9723de4fee11b9
- Ingested
- 23 Sep 2026, 08:19:02 UTC
- Source record
- Official CVE record