MediumGHSA-49j4-86m8-q2jwCVE-2024-21509

mysql2 vulnerable to Prototype Poisoning

Published 10 Apr 2024 · Updated 10 Sept 2026

Is your project on an affected mysql2?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Affected package

Affected
<3.9.4
Fixed in
3.9.4
Update to the fixed version for your release line, for example:npm install mysql2@3.9.4

Details

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.

Is GHSA-49j4-86m8-q2jw in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected mysql2, and gives you the command that fixes it.

More advisories for mysql2

  • HighGHSA-3f6p-5ww8-9rcrMySQL2: Auth Plugin Downgrade to mysql_clear_password Leaks Plaintext Credentials · 1 Sept 2026
  • MediumGHSA-rgwj-5xj2-c3m3MySQL2: Unbounded zlib inflate in compressed MySQL protocol handler allows decompression-bomb DoS · 31 Aug 2026
  • HighCVE-2024-21512mysql2 vulnerable to Prototype Pollution · 30 May 2024
  • CriticalCVE-2024-21511MySQL2 for Node Arbitrary Code Injection · 23 Apr 2024
  • CriticalCVE-2024-21508mysql2 Remote Code Execution (RCE) via the readCodeFor function · 11 Apr 2024
  • MediumCVE-2024-21507mysql2 cache poisoning vulnerability · 10 Apr 2024
mysql2 security overview

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.