Quick answers
- Is This vulnerability exploited in the wild?
- No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
- How severe is This vulnerability?
- Low severity, with a CVSS score of 3.1, published 31 August 2026.
- Which products and versions are affected?
- mysql2 (npm) SEMVER:introduced=0,fixed=3.23.1.
- Is there a fix for This vulnerability?
- Yes. mysql2 (npm): upgrade to 3.23.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is This vulnerability attacked?
- It is attacked over the network.
- Am I affected?
- Check whether you run mysql2 (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- mysql2 (npm): upgrade to 3.23.1 or later
npm install mysql2@3.23.1
Technical details
The vulnerability is an improper handling of highly compressed data (CWE-409) in the compressed protocol handler (lib/compressed_protocol.js). The handleCompressedPacket() function calls zlib.inflate() without specifying a maxOutputLength option, allowing unbounded memory allocation. An attacker who controls the MySQL server endpoint or can MITM a non-TLS connection can craft a deflate stream with extreme compression ratios (>1000:1) that decompresses to multiple gigabytes. No authentication bypass or data exposure occurs; impact is limited to denial of service of the client process. The fix adds a maxOutputLength cap to zlib.inflate() calls. Patched in version 3.23.1.
Affected products
- Node.js MySQL2 Contributors mysql2 <= 3.23.0
Timeline
- 2026-08-31: disclosed
- 2026-08-31: patched: Fixed in version 3.23.1