{"id":"CVE-2024-21507","aliases":["CVE-2024-21507","GHSA-mqr2-w7wj-jjgr"],"related":[],"kind":"vulnerability","state":"published","title":"mysql2 cache poisoning vulnerability","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2024-04-10T05:00:01.727Z","modified":"2026-09-10T03:50:12.775Z","severity":{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L/E:P","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L/E:P","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-20"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"3.9.3","status":"affected"}],"product":"mysql2","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","fixed":"3.9.3","status":"affected"}],"vendor":"mysqljs","product":"mysql2","cpe":"cpe:2.3:a:mysqljs:mysql2:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.9.3"}],"ecosystem":"npm","package":"mysql2","purl":"pkg:npm/mysql2","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.9.3"}],"vendor":"sidorares","product":"mysql2","cpe":"cpe:2.3:a:sidorares:mysql2:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://security.snyk.io/vuln/SNYK-JS-MYSQL2-6591300","tags":["exploit","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/sidorares/node-mysql2/commit/0d54b0ca6498c823098426038162ef10df02c818","tags":["patch","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://blog.slonser.info/posts/mysql2-attacker-configuration/","tags":["exploit","permissions-required","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://github.com/sidorares/node-mysql2/pull/2424","tags":["exploit","issue-tracking","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21507","tags":["advisory"],"sources":["ghsa"]},{"url":"https://blog.slonser.info/posts/mysql2-attacker-configuration","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/sidorares/node-mysql2","tags":["package"],"sources":["ghsa"]}],"credits":["Vsevolod Kokorin (Slonser)"],"assigner":"snyk","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2024-07-25T19:03:05.282Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-21507","url":"https://www.cve.org/CVERecord?id=CVE-2024-21507","licence":"CVE Terms of Use","modified":"2024-09-18T14:46:37.140Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mqr2-w7wj-jjgr","url":"https://github.com/advisories/GHSA-mqr2-w7wj-jjgr","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:12.775Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-21507","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21507","licence":"Public domain","modified":"2026-06-17T07:09:38.320Z"}],"updatedAt":"2026-11-25T22:58:39.021Z","epss":{"score":0.00744,"percentile":0.5598,"date":"2026-12-01T12:00:22.000Z"}}