{"id":"CVE-2024-21508","aliases":["CVE-2024-21508","GHSA-fpw7-j2hg-69v5"],"related":[],"kind":"vulnerability","state":"published","title":"mysql2 Remote Code Execution (RCE) via the readCodeFor function","summary":"Versions of the package mysql2 before 3.9.4 are vulnerable to Remote Code Execution (RCE) via the readCodeFor function due to improper validation of the supportBigNumbers and bigNumberStrings values.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Versions of the package mysql2 before 3.9.4 are vulnerable to Remote Code Execution (RCE) via the readCodeFor function due to improper validation of the supportBigNumbers and bigNumberStrings values.","source":"cvelist"},{"lang":"en","text":"Versions of the package mysql2 before 3.9.4 are vulnerable to Remote Code Execution (RCE) via the `readCodeFor` function due to improper validation of the `supportBigNumbers` and `bigNumberStrings` values.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Las versiones del paquete mysql2 anteriores a la 3.9.4 son vulnerables a la ejecución remota de código (RCE) a través de la función readCodeFor debido a una validación incorrecta de los valores supportBigNumbers y bigNumberStrings.","source":"nvd"}],"published":"2024-04-11T05:00:00.748Z","modified":"2026-09-10T03:50:11.212Z","severity":{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-94"],"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":"mysql2","product":"mysql2","cpe":"cpe:2.3:a:mysql2:mysql2:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.9.4"}],"ecosystem":"npm","package":"mysql2","purl":"pkg:npm/mysql2","source":"ghsa"}],"references":[{"url":"https://security.snyk.io/vuln/SNYK-JS-MYSQL2-6591085","tags":["web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://blog.slonser.info/posts/mysql2-attacker-configuration/","tags":["x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://github.com/sidorares/node-mysql2/blob/1609b5393516d72a4ae47196837317fbe75e0c13/lib/parsers/text_parser.js%23L14C10-L14C21","tags":["web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/sidorares/node-mysql2/pull/2572","tags":["web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/sidorares/node-mysql2/commit/74abf9ef94d76114d9a09415e28b496522a94805","tags":["web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/sidorares/node-mysql2/releases/tag/v3.9.4","tags":["web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21508","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":"none","automatable":"yes","technicalImpact":"total","date":"2024-04-11T13:05:22.610Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-21508","url":"https://www.cve.org/CVERecord?id=CVE-2024-21508","licence":"CVE Terms of Use","modified":"2024-08-01T22:20:40.908Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-fpw7-j2hg-69v5","url":"https://github.com/advisories/GHSA-fpw7-j2hg-69v5","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:11.212Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-21508","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21508","licence":"Public domain","modified":"2026-06-17T07:09:38.450Z"}],"updatedAt":"2026-11-25T22:58:39.099Z","epss":{"score":0.02554,"percentile":0.85499,"date":"2026-12-01T12:00:22.000Z"}}