{"id":"GHSA-5f7m-mmpc-qhh4","aliases":["GHSA-5f7m-mmpc-qhh4"],"related":[],"kind":"vulnerability","state":"published","title":"mysql Node.JS Module Vulnerable to Remote Memory Exposure","summary":"Versions of `mysql` before 2.14.0 are vulnerable to remove memory exposure.\n\nAffected versions of `mysql` package allocate and send an uninitialized memory over the network when a number is provided as a password.\n\nOnly `mysql` running on Node.js versions below 6.0.0 are affected due to a throw added in newer node.js versions.\n\nProof of Concept:\n\n```\nrequire('mysql').createConnection({\n  host: 'localhost',\n  user: 'user',\n  password : USERPROVIDEDINPUT,  // number\n  database : 'my_db'\n}).connect();\n```\n\n\n\n## Recommendation\n\nUpdate to version 2.14.0 or later.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"Versions of `mysql` before 2.14.0 are vulnerable to remove memory exposure.\n\nAffected versions of `mysql` package allocate and send an uninitialized memory over the network when a number is provided as a password.\n\nOnly `mysql` running on Node.js versions below 6.0.0 are affected due to a throw added in newer node.js versions.\n\nProof of Concept:\n\n```\nrequire('mysql').createConnection({\n  host: 'localhost',\n  user: 'user',\n  password : USERPROVIDEDINPUT,  // number\n  database : 'my_db'\n}).connect();\n```\n\n\n\n## Recommendation\n\nUpdate to version 2.14.0 or later.","format":"markdown","source":"ghsa"}],"published":"2019-05-23T09:27:00.000Z","modified":"2022-08-03T20:30:06.000Z","severity":{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"}],"cwes":["CWE-201"],"affected":[{"ranges":[{"type":"semver","introduced":"2.0.0-alpha8","status":"affected","fixed":"2.14.0"}],"ecosystem":"npm","package":"mysql","purl":"pkg:npm/mysql","source":"ghsa"}],"references":[{"url":"https://github.com/mysqljs/mysql/commit/192fe45593ba5768534afb6f2154432ca67a5002","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/mysqljs/mysql/commit/310c6a7d1b2e14b63b572dbfbfa10128f20c6d52","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/mysqljs/mysql","tags":["package"],"sources":["ghsa"]},{"url":"https://www.npmjs.com/advisories/602","tags":["web"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5f7m-mmpc-qhh4","url":"https://github.com/advisories/GHSA-5f7m-mmpc-qhh4","licence":"CC-BY-4.0","modified":"2022-08-03T20:30:06.000Z"}],"updatedAt":"2026-11-25T22:56:44.170Z"}