# GHSA-5f7m-mmpc-qhh4: mysql Node.JS Module Vulnerable to Remote Memory Exposure

- Severity: Medium (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2019-05-23T09:27:00.000Z
- Modified: 2022-08-03T20:30:06.000Z
- Weaknesses: CWE-201

## Description

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.

(As written by GitHub Advisory Database.)

## Affected

- mysql (npm): from 2.0.0-alpha8 before 2.14.0

## References

- <https://github.com/mysqljs/mysql/commit/192fe45593ba5768534afb6f2154432ca67a5002> (web)
- <https://github.com/mysqljs/mysql/commit/310c6a7d1b2e14b63b572dbfbfa10128f20c6d52> (web)
- <https://github.com/mysqljs/mysql> (package)
- <https://www.npmjs.com/advisories/602> (web)

## Sources

- GitHub Advisory Database: [GHSA-5f7m-mmpc-qhh4](https://github.com/advisories/GHSA-5f7m-mmpc-qhh4), CC-BY-4.0, modified 2022-08-03

---

Page: https://cve.day/GHSA-5f7m-mmpc-qhh4 · Whole record: https://cve.day/GHSA-5f7m-mmpc-qhh4.json · Rebuilt by cve.day 2026-11-25T22:56:44.170Z
