mysql2 is vulnerable to Denial of Service (DoS)
59
Medium Risk
handleCompressedPacket inflates server-supplied MySQL compressed frames with zlib.inflate and no output size ceiling, so the declared uncompressed length is never enforced against the real inflate result. An attacker who controls compressed packet contents can expand a small payload into a much larger buffer and exhaust CPU or memory. The fix passes maxOutputLength: deflatedLength into zlib.inflate so oversized decompressed output is rejected.
You are affected if you are using a version that falls within the vulnerable range and MySQL client compression is enabled (compress: true).
mysql2 is vulnerable to Denial of Service (DoS) in versions 0.0.1 - 3.23.0.
Upgrade the mysql2 library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant