MediumGHSA-mqr2-w7wj-jjgrCVE-2024-21507

mysql2 cache poisoning vulnerability

Published 10 Apr 2024 · Updated 10 Sept 2026

Affected package

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

Details

Versions of the package mysql2 before 3.9.3 are vulnerable to Improper Input Validation through the keyFromFields function, resulting in cache poisoning. An attacker can inject a colon : character within a value of the attacker-crafted key.

Is GHSA-mqr2-w7wj-jjgr 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.

References

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