Advisory

GHSA-5f7m-mmpc-qhh4

Also known as: None

Summary

mysql Node.JS Module Vulnerable to Remote Memory Exposure

Details

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2019-05-23 09:27 UTC
Modified
2022-08-03 20:30 UTC

Affected packages and fixes

mysql

npm · All systems

Affected

  • introduced 2.0.0-alpha8, fixed 2.14.0 (semver)

Fixed versions

2.14.0

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences