CVE-2024-21507
MEDIUM 5.3CVSS 3.1mysql2 cache poisoning vulnerability
Versions of the package mysql2 before 3.9.3 are vulnerable to Improper Input Validation through the keyFromFields function, resulting in cache poisoning. An attacker can inject a colon (:) character within a value of the attacker-crafted key.
- Published
- 10 Apr 2024
- Last modified
- 10 Sep 2026
- Assigned by
- report@snyk.io
- NVD status
- Analyzed
- Weakness
- CWE-20
- Also known as
- GHSA-mqr2-w7wj-jjgr
- Sources
- NVDJSONOSV GHSA-mqr2-w7wj-jjgrJSON
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:L/VI:N/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:L/I:N/A:L |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | sidorares | mysql2cpe:2.3:a:sidorares:mysql2:*:*:*:*:*:*:*:* |
< 3.9.3 | 3.9.3 |
| OSV | npm | mysql2 | < 3.9.3 | 3.9.3 |
References
- https://blog.slonser.info/posts/mysql2-attacker-configuration/ · Exploit, Permissions Required, WEB
- https://github.com/sidorares/node-mysql2/commit/0d54b0ca6498c823098426038162ef10df02c818 · Patch, WEB
- https://github.com/sidorares/node-mysql2/pull/2424 · Exploit, Issue Tracking, WEB
- https://security.snyk.io/vuln/SNYK-JS-MYSQL2-6591300 · Exploit, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-21507 · 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:11 UTC · OSV: first stored (published 10 Apr 2024)