org.mvnpm:mysql2@3.23.2

  • latest version

    3.24.6

  • first published

    1 years ago

  • latest version published

    1 months ago

  • licenses detected

  • package registry

  • Direct Vulnerabilities

    Known vulnerabilities in the org.mvnpm:mysql2 package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • C
    SQL Injection

    org.mvnpm:mysql2 is a mostly API compatible with mysqljs and supports majority of features.

    Affected versions of this package are vulnerable to SQL Injection via Connection.format() and Connection.escape(), which always escape single quotes as \' regardless of the server's SQL mode. When the MySQL server session has NO_BACKSLASH_ESCAPES enabled, the server treats the backslash as a literal character, so the quote closes the string literal and any text following it executes as SQL. An attacker can pass values through ? placeholders in connection.query() to break out of string literals and append arbitrary SQL, enabling data disclosure, authentication bypass, or data modification. connection.execute() (prepared statements) is not affected.

    Note: This is only exploitable when the connected MySQL server session has NO_BACKSLASH_ESCAPES in its sql_mode, which is not a MySQL default and must be set by the deployment.

    How to fix SQL Injection?

    A fix was pushed into the master branch but not yet published.

    [0,)