Is mysql2 0.2 vulnerable?
npm · 5 releases from 0.2.0 to 0.2.4 · latest mysql2 is 3.24.6 · checked 2 Nov 2026
Yes: 7 known advisories
Yes. mysql2 0.2.4, the last 0.2 release, is affected by 7 known security advisories (2 critical, 2 high, 3 medium), including CVE-2024-21511, CVE-2024-21508, CVE-2024-21512. Upgrade to 3.23.1 or later to fix all of them.
npm install mysql2@3.23.1Advisories affecting mysql2 0.2.4
MySQL2: Auth Plugin Downgrade to mysql_clear_password Leaks Plaintext Credentials
- Affected
- <3.22.0
- Fixed in
- 3.22.0
MySQL2: Unbounded zlib inflate in compressed MySQL protocol handler allows decompression-bomb DoS
- Affected
- <3.23.1
- Fixed in
- 3.23.1
mysql2 vulnerable to Prototype Pollution
- Affected
- <3.9.8
- Fixed in
- 3.9.8
MySQL2 for Node Arbitrary Code Injection
- Affected
- <3.9.7
- Fixed in
- 3.9.7
mysql2 Remote Code Execution (RCE) via the readCodeFor function
- Affected
- <3.9.4
- Fixed in
- 3.9.4
mysql2 vulnerable to Prototype Poisoning
- Affected
- <3.9.4
- Fixed in
- 3.9.4
mysql2 cache poisoning vulnerability
- Affected
- <3.9.3
- Fixed in
- 3.9.3
Which of your client projects are still on mysql2 0.2?
NPMscan reads the lockfiles in every GitHub repo you pick, finds the exact mysql2 version each one installs, and checks it against these advisories. Each finding comes with the command that fixes it.
Other mysql2 versions
Advisory data from OSV.dev (opens OSV.dev in a new tab), which includes the GitHub Advisory Database. Release list from the npm registry. Refreshed daily.