6.5medium
mysql2 cache poisoning vulnerability
- Severity
- 6.5medium CVSS:3.1 by snyk
- Exploit likelihood
- 0.74% (higher than 55% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- snyk
- Also known as
- GHSA-mqr2-w7wj-jjgr
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| mysql2 | before 3.9.3 | CVE List |
| mysqljs mysql2 | before 3.9.3 | CVE List |
| mysql2 (npm) | before 3.9.3 | GitHub Advisory Database |
| sidorares mysql2 | before 3.9.3 | NVD |
All scores
| snyk | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L/E:P |
| GitHub | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L |
| GitHub | medium 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 | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A: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.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.
GitHub Advisory Database
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.
NVD (es)
Las versiones del paquete mysql2 anteriores a la 3.9.3 son vulnerables a una validación de entrada incorrecta a través de la función keyFromFields, lo que provoca envenenamiento de la caché. Un atacante puede inyectar un carácter de dos puntos (:) dentro de un valor de la clave creada por el atacante.
References
| https://security.snyk.io/vuln/SNYK-JS-MYSQL2-6591300 | exploit, third-party-advisory, web | |
| https://github.com/sidorares/node-mysql2/commit/0d54b0ca6498c823098426038162ef10df02c818 | patch, web | |
| https://blog.slonser.info/posts/mysql2-attacker-configuration/ | exploit, permissions-required | |
| https://github.com/sidorares/node-mysql2/pull/2424 | exploit, issue-tracking, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2024-21507 | 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-21507 changed 2024-09-18 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-mqr2-w7wj-jjgr changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2024-21507 changed 2026-06-17 | Public domain |