npmWorst: Critical7 advisories

mysql2: known vulnerabilities

mysql2 has 7 reviewed security advisories in the GitHub Advisory Database — 2 critical, 2 high, 3 moderate. The most recent was published 2026-09-01. Each one below lists the affected version range, the release that fixes it, its CVE and severity. SkyShield matches these against the mysql2 versions running across your servers, containers and images, and ranks what to patch first.

How to fix mysql2

Upgrade mysql2 to a release at or above the fixed version shown for each advisory below. For npm:

npm install mysql2@3.22.0 (or run npm audit fix)

SkyShield checks the installed version on every machine and container, so you can see which hosts are still on an affected release after you roll the fix out.

Advisories (7)

MySQL2: Auth Plugin Downgrade to mysql_clear_password Leaks Plaintext Credentials High CWE-522 — Affected: before 3.22.0. Fixed in 3.22.0. Published 2026-09-01. GHSA-3f6p-5ww8-9rcr
MySQL2: Unbounded zlib inflate in compressed MySQL protocol handler allows decompression-bomb DoS Moderate 5.9 CWE-409 — Affected: before 3.23.1. Fixed in 3.23.1. Published 2026-08-31. GHSA-rgwj-5xj2-c3m3
MySQL2 for Node Arbitrary Code Injection Critical 9.8 CWE-94 — Affected: before 3.9.7. Fixed in 3.9.7. Published 2024-04-23. GHSA-4rch-2fh8-94vw · CVE-2024-21511
mysql2 Remote Code Execution (RCE) via the readCodeFor function Critical 9.8 CWE-94 — Affected: before 3.9.4. Fixed in 3.9.4. Published 2024-04-11. GHSA-fpw7-j2hg-69v5 · CVE-2024-21508
mysql2 vulnerable to Prototype Poisoning Moderate 6.5 CWE-1321 — Affected: before 3.9.4. Fixed in 3.9.4. Published 2024-04-10. GHSA-49j4-86m8-q2jw · CVE-2024-21509

Find mysql2 across your fleet

Install one agent per server and connect your cloud. SkyShield matches your packages and images against GHSA, CISA KEV and EPSS and shows the fix per machine. Free for one server, then from $49 per server a month. Start free.