{"id":"GHSA-fpw7-j2hg-69v5","summary":"mysql2 Remote Code Execution (RCE) via the readCodeFor function","details":"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.","aliases":["CVE-2024-21508"],"modified":"2026-07-17T21:14:11.906348308Z","published":"2024-04-11T06:30:35Z","database_specific":{"nvd_published_at":"2024-04-11T05:15:47Z","cwe_ids":["CWE-94"],"severity":"CRITICAL","github_reviewed":true,"github_reviewed_at":"2024-04-12T13:50:58Z"},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21508"},{"type":"WEB","url":"https://github.com/sidorares/node-mysql2/pull/2572"},{"type":"WEB","url":"https://github.com/sidorares/node-mysql2/commit/74abf9ef94d76114d9a09415e28b496522a94805"},{"type":"WEB","url":"https://blog.slonser.info/posts/mysql2-attacker-configuration"},{"type":"PACKAGE","url":"https://github.com/sidorares/node-mysql2"},{"type":"WEB","url":"https://github.com/sidorares/node-mysql2/blob/1609b5393516d72a4ae47196837317fbe75e0c13/lib/parsers/text_parser.js%23L14C10-L14C21"},{"type":"WEB","url":"https://github.com/sidorares/node-mysql2/releases/tag/v3.9.4"},{"type":"WEB","url":"https://security.snyk.io/vuln/SNYK-JS-MYSQL2-6591085"}],"affected":[{"package":{"name":"mysql2","ecosystem":"npm","purl":"pkg:npm/mysql2"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.9.4"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/04/GHSA-fpw7-j2hg-69v5/GHSA-fpw7-j2hg-69v5.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}]}