WS-2026-0048
Published:September 01, 2026
Updated:September 02, 2026
node-mysql2 accepts a server-initiated switch to the mysql_clear_password authentication plugin without requiring explicit opt-in, so the client transmits the password in plaintext. A malicious or DNS-hijacked server can request cleartext authentication and capture credentials even when the connection is not encrypted. Fixed in 3.22.0, which gates the built-in plugin behind a new enableCleartextPlugin option (or a custom mysql_clear_password entry in authPlugins) and otherwise fails the connection with MYSQL_CLEAR_PASSWORD_NOT_ENABLED.
Affected Packages
https://github.com/sidorares/node-mysql2.git (GITHUB):
Affected version(s) >=v0.10.4 <v3.22.0Fix Suggestion:
Update to version v3.22.0mysql2 (NPM):
Affected version(s) >=0.0.1 <3.22.0Fix Suggestion:
Update to version 3.22.0Related Resources (4)
Do you need more information?
Contact UsCVSS v4
Base Score:
8.9
Attack Vector
NETWORK
Attack Complexity
HIGH
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
NONE
Vulnerable System Confidentiality
HIGH
Vulnerable System Integrity
NONE
Vulnerable System Availability
NONE
Subsequent System Confidentiality
HIGH
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
6.8
Attack Vector
NETWORK
Attack Complexity
HIGH
Privileges Required
NONE
User Interaction
NONE
Scope
CHANGED
Confidentiality
HIGH
Integrity
NONE
Availability
NONE
Weakness Type (CWE)
Insufficiently Protected Credentials