mysql2 Inventory Lives in Packages and SQL Modes
ZoomEye returned 68 matches for title="mysql2" and 2,856 for http.body="mysql2" on November 30, 2026, using sub_type=all, page 1, and page size 1. The title count is a narrow public reference. The body count includes documentation, examples, package pages, and application text. Neither count identifies a Node.js service that uses the driver.
CVE-2026-139877 affects mysql2 versions through 3.24.6 and is fixed in 3.25.0. The client normally runs inside an application. Its vulnerability appears when the MySQL server enables NO_BACKSLASH_ESCAPES and the application uses client-side escaping through connection.query() placeholders. The quotes are escaped as if backslashes remain special. Under the different SQL mode, an attacker-controlled value can change the query.
Why the count is indirect
A public page that mentions mysql2 can expose an error, a dependency file, or a code example. It cannot show the running package version or the database session mode. A service can use mysql2 without printing the name anywhere in an HTTP body. A package registry page can mention it without running it at all.
The useful measurement is an SBOM plus connection configuration. Search lockfiles for mysql2, check transitive and vendored copies, and record the database mode for each application role. A service may use multiple connections with different modes. Check the session after middleware or pool initialization changes it.
Turn the finding into a test
Build an isolated test against the same MySQL-compatible server mode. Send quotes, backslashes, comments, and multi-byte text through connection.query() placeholders. Confirm whether the fixed driver preserves data and whether the old driver changes the query structure. Then test the application's own query patterns, especially paths that use dynamic table names, sort order, and limits, where placeholders do not apply.
Upgrade to 3.25.0 or later. Prefer server-side prepared statements through APIs that support them. Keep a startup inventory record with the resolved client version and the server mode. Rebuild container images and serverless packages so a cached transitive dependency does not restore the old version.
Database-side review
Check whether the application role can read or modify more data than the service needs. A SQL injection flaw becomes more serious when the role can write files, execute procedures, or access other tenants. Review audit logs around unusual queries and authentication changes. If exploitation is suspected, preserve the database audit trail and rotate the application credentials.
The 68 title matches and 2,856 body matches are context for public research. They do not establish affected services. The owned asset record should identify the package, connection mode, query API, and patch state.
Reporting boundary
Use language such as: a public title query returned 68 matches at the recorded time; the organization has identified 12 Node.js services using mysql2, three below 3.25.0, and one database session with NO_BACKSLASH_ESCAPES. The numbers in that example are placeholders, not findings. The structure separates public observation from internal deployment evidence.
Top comments (0)