Skip to content
Fencer Intel
medium —

GHSA-5f7m-mmpc-qhh4 json

mysql Node.JS Module Vulnerable to Remote Memory Exposure

published 7y ago modified 4y ago

cvss
—
not scored
cisa kev
Not listed
not in CISA's catalog
epss
—
no score, EPSS covers CVEs only
public exploits
0
none known

Summary

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.

Patch / fix

  • npm mysql 2.14.0

Is GHSA-5f7m-mmpc-qhh4 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Affected packages

ecosystem package affected fixed in
npm mysql
>=2.0.0-alpha8, <2.14.0
2.14.0

Classification

Weakness
  • CWE-201 Insertion of Sensitive Information Into Sent Data

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.