GHSA-5f7m-mmpc-qhh4: Mysql Mysql Node.JS Module Vulnerable To Vulnerability
MODERATEGHSA-5f7m-mmpc-qhh4 is a MODERATE mysql node.js module vulnerable to vulnerability (CWE-201: Insertion of Sensitive Information Into Sent Data) affecting Mysql libraries in the npm ecosystem. The issue involves mysql node.js module vulnerable to remote memory exposure. Remediation is available by upgrading affected packages to version 2.14.0.
GHSA-5f7m-mmpc-qhh4 at a Glance
How to Fix GHSA-5f7m-mmpc-qhh4
To remediate this vulnerability, upgrade all affected Mysql dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install mysql@2.14.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls mysql
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-5f7m-mmpc-qhh4, inspect your project dependencies using npm:
npm ls mysql
Analyze the terminal output to locate any version of Mysql in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.14.0), your application is affected.
Note: The npm ls mysql command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-201: Insertion of Sensitive Information Into Sent Data, where the code transmits data to another actor, but a portion of the data includes sensitive information that should not be accessible to that actor. In Mysql, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-5f7m-mmpc-qhh4 Affected Mysql Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mysql
|
npm |
≥ 2.0.0-alpha8
< 2.14.0
|
2.14.0
|
References
Frequently Asked Questions
What is GHSA-5f7m-mmpc-qhh4?
Which Mysql versions are affected?
What version fixes GHSA-5f7m-mmpc-qhh4?
Is mysql affected?
What CWE is associated with GHSA-5f7m-mmpc-qhh4?
How can I check npm dependencies for GHSA-5f7m-mmpc-qhh4?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5f7m-mmpc-qhh4",
"modified" : "2022-08-03T20:30:06Z",
"published" : "2019-05-23T09:27:00Z",
"aliases" : [ ],
"summary" : "mysql Node.JS Module Vulnerable to Remote Memory Exposure",
"details" : "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.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "mysql"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0-alpha8"
}, {
"fixed" : "2.14.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/mysqljs/mysql/commit/192fe45593ba5768534afb6f2154432ca67a5002"
}, {
"type" : "WEB",
"url" : "https://github.com/mysqljs/mysql/commit/310c6a7d1b2e14b63b572dbfbfa10128f20c6d52"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mysqljs/mysql"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/602"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-201" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2019-05-23T07:40:10Z",
"nvd_published_at" : null
}
}