CVE-2024-21509 json
mysql2 vulnerable to Prototype Poisoning
published 2y ago modified 2mo ago also GHSA-49j4-86m8-q2jw , EUVD-2024-1089
- cvss
- 6.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.0%
- EPSS 1.0% chance of exploitation in 30 days, percentile 61%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm mysql2 3.9.4
- n/a mysql2 3.9.4
- mysqljs mysql2 3.9.4
Is CVE-2024-21509 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2024-21509 updated cvss 6.5
mysql2: Prototype Poisoning
-
Red Hat Developer Hub 1 rhdh/rhdh-hub-rhel9, rhdh-operator-containernot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 2y ago
Exploit prediction
0.96% chance of exploitation in the next 30 days, higher than 61% of all scored CVEs (FIRST EPSS, 2026-11-11).
Exploits and checks
- github.com https://github.com/sidorares/node-mysql2/pull/2574 referenced PoC, tagged "exploit" by a source, unverified
- security.snyk.io https://security.snyk.io/vuln/SNYK-JS-MYSQL2-6591084 referenced PoC, tagged "exploit" by a source, unverified
- blog.slonser.info https://blog.slonser.info/posts/mysql2-attacker-configuration/ referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L/E:P |
| CNA | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L |
| GitHub | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | mysql2 | <3.9.4 |
3.9.4 |
Affected products
- n/a mysql2
- mysqljs mysql2
Classification
- Weakness
-
- CWE-1321 Improperly Controlled Modification of Object Prototype Attributes
References
-
github.com
/sidorares/node-mysql2/commit/4a964a3910a4b8de008696c554ab1b492e9b4691
web, patch
-
github.com
/sidorares/node-mysql2/pull/2574
web, exploit, issue-tracking
-
security.snyk.io
/vuln/SNYK-JS-MYSQL2-6591084
web, exploit, third-party-advisory
-
blog.slonser.info
/posts/mysql2-attacker-configuration/
exploit, permissions-required
-
github.com
/sidorares/node-mysql2/blob/fd3d117da82cc5c5fa5a3701d7b33ca77691bc61/lib/parsers/text_parser.js%23L134
web, broken-link
-
github.com
/sidorares/node-mysql2/releases/tag/v3.9.4
web, release-notes
-
nvd.nist.gov
/vuln/detail/CVE-2024-21509
advisory
-
blog.slonser.info
/posts/mysql2-attacker-configuration
web
-
github.com
/sidorares/node-mysql2
package
Sources
- CVE List CVE-2024-21509
- GitHub Advisory GHSA-49j4-86m8-q2jw
- NVD CVE-2024-21509
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.