Security mailing lists by PureSourceCode

GHSA-5f7m-mmpc-qhh4

MEDIUM

mysql Node.JS Module Vulnerable to Remote Memory Exposure

Versions of mysql before 2.14.0 are vulnerable to remove memory exposure.

Affected versions of mysql package allocate and send an uninitialized memory over the network when a number is provided as a password.

Only mysql running on Node.js versions below 6.0.0 are affected due to a throw added in newer node.js versions.

Proof of Concept:

require('mysql').createConnection({
  host: 'localhost',
  user: 'user',
  password : USERPROVIDEDINPUT,  // number
  database : 'my_db'
}).connect();

Recommendation

Update to version 2.14.0 or later.

Published
23 May 2019
Last modified
3 Aug 2022
Weakness
CWE-201
Sources
OSVJSON

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV npm mysql >= 2.0.0-alpha8, < 2.14.0 2.14.0

References

History

  • 25 Nov 2026 20:10 UTC · OSV: first stored (published 23 May 2019)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.