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?
- Informational severity, published 23 May 2019.
- Which products and versions are affected?
- mysql (npm) SEMVER:introduced=2.0.0-alpha8,fixed=2.14.0.
- Is there a fix for This vulnerability?
- Yes. mysql (npm): upgrade to 2.14.0 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, in a software library.
- Am I affected?
- Check whether you run mysql (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
- mysql (npm): upgrade to 2.14.0 or later
npm install mysql@2.14.0
Technical details
The vulnerability is a memory disclosure issue (CWE-201) in the mysql Node.js package affecting versions 2.0.0-alpha8 through 2.13.x. When a numeric value is passed as the password parameter during database connection creation, the affected code allocates a buffer without proper initialization and sends it over the network during the authentication handshake. The vulnerability is triggered only when connecting to MySQL servers and the password parameter is of numeric type rather than a string. Network access to the vulnerable application is required; no authentication is needed from the attacker's perspective. The flaw was fixed in version 2.14.0 by using the safe-buffer module to ensure proper buffer initialization. The vulnerability only manifests in Node.js versions below 6.0.0, as newer versions include runtime protections that throw an error when attempting to create an uninitialized buffer.
Affected products
- npm mysql 2.0.0-alpha8 through 2.13.x
Timeline
- 2019-05-23: disclosed