mysql2@1.6.6 vulnerabilities

fast mysql driver. Implements core protocol, prepared statements, ssl and compression in native JS

Direct Vulnerabilities

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

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • C
Remote Code Execution (RCE)

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

Affected versions of this package are vulnerable to Remote Code Execution (RCE) via the readCodeFor function due to improper validation of the supportBigNumbers and bigNumberStrings values.

How to fix Remote Code Execution (RCE)?

Upgrade mysql2 to version 3.9.4 or higher.

<3.9.4
  • M
Prototype Poisoning

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

Affected versions of this package are vulnerable to Prototype Poisoning due to insecure results object creation and improper user input sanitization passed through parserFn in text_parser.js and binary_parser.js.

How to fix Prototype Poisoning?

Upgrade mysql2 to version 3.9.4 or higher.

<3.9.4
  • M
Improper Input Validation

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

Affected versions of this package are vulnerable to Improper Input Validation through the keyFromFields function, resulting in cache poisoning. An attacker can inject a colon (:) character within a value of the attacker-crafted key.

How to fix Improper Input Validation?

Upgrade mysql2 to version 3.9.3 or higher.

<3.9.3