{"id":"CVE-2024-21509","aliases":["CVE-2024-21509","GHSA-49j4-86m8-q2jw"],"related":[],"kind":"vulnerability","state":"published","title":"mysql2 vulnerable to Prototype Poisoning","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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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`.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Las versiones del paquete mysql2 anteriores a la 3.9.4 son vulnerables al envenenamiento de prototipos debido a la creación insegura de objetos de resultados y a una desinfección inadecuada de las entradas del usuario pasadas a través de parserFn en text_parser.js y binario_parser.js.","source":"nvd"}],"published":"2024-04-10T05:00:00.795Z","modified":"2026-09-10T03:50:11.188Z","severity":{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/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:N/I:L/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:N/I:L/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:N/VI:L/VA:L/SC:N/SI:N/SA:N","rating":"MEDIUM"}],"cwes":["CWE-1321"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"3.9.4","status":"affected"}],"product":"mysql2","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"3.9.4","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.4"}],"ecosystem":"npm","package":"mysql2","purl":"pkg:npm/mysql2","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.9.4"}],"vendor":"sidorares","product":"mysql2","cpe":"cpe:2.3:a:sidorares:mysql2:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://security.snyk.io/vuln/SNYK-JS-MYSQL2-6591084","tags":["exploit","third-party-advisory","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/blob/fd3d117da82cc5c5fa5a3701d7b33ca77691bc61/lib/parsers/text_parser.js%23L134","tags":["broken-link","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/sidorares/node-mysql2/commit/4a964a3910a4b8de008696c554ab1b492e9b4691","tags":["patch","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/sidorares/node-mysql2/pull/2574","tags":["exploit","issue-tracking","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/sidorares/node-mysql2/releases/tag/v3.9.4","tags":["release-notes","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21509","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"],"assigner":"snyk","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2024-08-22T13:08:47.484Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-21509","url":"https://www.cve.org/CVERecord?id=CVE-2024-21509","licence":"CVE Terms of Use","modified":"2024-08-22T13:11:18.154Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-49j4-86m8-q2jw","url":"https://github.com/advisories/GHSA-49j4-86m8-q2jw","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:11.188Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-21509","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21509","licence":"Public domain","modified":"2026-06-17T07:09:38.567Z"}],"updatedAt":"2026-11-25T22:58:39.021Z","epss":{"score":0.00955,"percentile":0.624,"date":"2026-12-01T12:00:22.000Z"}}