{"description":"Trending threats, MITRE ATT\u0026CK coverage, and detection metadata. Fed continuously.","favicon":"https://feed.craftedsignal.io/favicon-32x32.png","feed_url":"https://feed.craftedsignal.io/products/mysql2--3.22.0/feed.json","home_page_url":"https://feed.craftedsignal.io/","icon":"https://feed.craftedsignal.io/apple-touch-icon.png","items":[{"_cs_actors":[],"_cs_cpes":[],"_cs_cves":[],"_cs_exploited":false,"_cs_has_poc":false,"_cs_poc_references":[],"_cs_products":["mysql2 (\u003c 3.22.0)"],"_cs_severities":["high"],"_cs_tags":["credential-access","vulnerability","nodejs"],"_cs_type":"advisory","_cs_vendors":[],"content_html":"\u003cp\u003eThe mysql2 package for Node.js is susceptible to credential interception due to insecure implementation of the mysql_clear_password authentication plugin. When a client connects to a server, the authentication process is managed by a list of standard plugins. An attacker operating a rogue MySQL server or performing a man-in-the-middle (MITM) attack can issue an AuthSwitchRequest (0xFE) to downgrade the authentication method to mysql_clear_password. Unlike other plugins, such as caching_sha2_password, the mysql2 driver fails to verify if a secure TLS connection is established before transmitting the password in plaintext. This flaw affects all versions of mysql2 prior to 3.22.0. With approximately 9 million weekly downloads, this vulnerability poses a significant risk to applications in environments where network traffic is not fully encrypted, particularly those traversing untrusted or internal network segments.\u003c/p\u003e\n\u003ch2 id=\"attack-chain\"\u003eAttack Chain\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eAttacker establishes a rogue MySQL server or performs a MITM position between the application and the legitimate database.\u003c/li\u003e\n\u003cli\u003eThe mysql2 client initiates a connection to the database.\u003c/li\u003e\n\u003cli\u003eThe rogue server responds with an initial handshake advertising support for caching_sha2_password.\u003c/li\u003e\n\u003cli\u003eThe client sends a hashed authentication response as expected by the protocol.\u003c/li\u003e\n\u003cli\u003eThe rogue server ignores the response and issues an AuthSwitchRequest (0xFE) command.\u003c/li\u003e\n\u003cli\u003eThe AuthSwitchRequest specifically requests the mysql_clear_password authentication plugin.\u003c/li\u003e\n\u003cli\u003eThe mysql2 driver, failing to check for an active SSL/TLS layer, invokes the mysql_clear_password plugin.\u003c/li\u003e\n\u003cli\u003eThe driver transmits the plaintext database password to the rogue server, where the attacker captures it.\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch2 id=\"impact\"\u003eImpact\u003c/h2\u003e\n\u003cp\u003eThe vulnerability results in the exposure of database credentials in plaintext. This impacts any application using mysql2 (\u0026lt; 3.22.0) that has not explicitly enforced TLS connections for all database communications. Given the library's high volume of weekly downloads (9 million), this poses a systemic risk to enterprise applications, particularly in cloud-native environments where network paths between services may be intercepted or spoofed.\u003c/p\u003e\n\u003ch2 id=\"recommendation\"\u003eRecommendation\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003eUpgrade the mysql2 package to version 3.22.0 or later immediately to include the mandatory TLS check for authentication plugins.\u003c/li\u003e\n\u003cli\u003eEnforce SSL/TLS connections for all database configurations within the application code to prevent unauthorized downgrades.\u003c/li\u003e\n\u003cli\u003eAudit network egress traffic from application servers to identify unexpected connections to database ports (default 3306) targeting unauthorized infrastructure.\u003c/li\u003e\n\u003cli\u003eImplement network-level segmentation and mutual TLS (mTLS) for database communications to mitigate the impact of rogue or compromised database nodes.\u003c/li\u003e\n\u003c/ul\u003e\n","date_modified":"2026-09-01T18:00:50Z","date_published":"2026-09-01T18:00:50Z","id":"https://feed.craftedsignal.io/briefs/2026-09-mysql2-cleartext-auth/","summary":"The mysql2 Node.js database driver is vulnerable to credential theft because it does not enforce TLS before executing a requested authentication switch to the mysql_clear_password plugin.","title":"MySQL2 Auth Plugin Downgrade Vulnerability","url":"https://feed.craftedsignal.io/briefs/2026-09-mysql2-cleartext-auth/"}],"language":"en","title":"CraftedSignal Threat Feed - Mysql2 (\u003c 3.22.0)","version":"https://jsonfeed.org/version/1.1"}