6.5
MEDIUM
CVE-2024-21509
MySQL2 Prototype Poisoning
Description

Versions of the package mysql2 before 3.9.4 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.

INFO

Published Date :

April 10, 2024, 5:15 a.m.

Last Modified :

June 17, 2025, 6:15 p.m.

Remotely Exploitable :

Yes !

Impact Score :

2.5

Exploitability Score :

3.9
Affected Products

The following products are affected by CVE-2024-21509 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Sidorares mysql2

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2024-21509 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2024-21509 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • Initial Analysis by [email protected]

    Jun. 17, 2025

    Action Type Old Value New Value
    Added CPE Configuration OR *cpe:2.3:a:sidorares:mysql2:*:*:*:*:*:*:*:* versions up to (excluding) 3.9.4
    Added Reference Type CVE: https://blog.slonser.info/posts/mysql2-attacker-configuration/ Types: Exploit, Permissions Required
    Added Reference Type Snyk: https://blog.slonser.info/posts/mysql2-attacker-configuration/ Types: Exploit, Permissions Required
    Added Reference Type CVE: https://github.com/sidorares/node-mysql2/blob/fd3d117da82cc5c5fa5a3701d7b33ca77691bc61/lib/parsers/text_parser.js%23L134 Types: Broken Link
    Added Reference Type Snyk: https://github.com/sidorares/node-mysql2/blob/fd3d117da82cc5c5fa5a3701d7b33ca77691bc61/lib/parsers/text_parser.js%23L134 Types: Broken Link
    Added Reference Type CVE: https://github.com/sidorares/node-mysql2/commit/4a964a3910a4b8de008696c554ab1b492e9b4691 Types: Patch
    Added Reference Type Snyk: https://github.com/sidorares/node-mysql2/commit/4a964a3910a4b8de008696c554ab1b492e9b4691 Types: Patch
    Added Reference Type CVE: https://github.com/sidorares/node-mysql2/pull/2574 Types: Exploit, Issue Tracking
    Added Reference Type Snyk: https://github.com/sidorares/node-mysql2/pull/2574 Types: Exploit, Issue Tracking
    Added Reference Type CVE: https://github.com/sidorares/node-mysql2/releases/tag/v3.9.4 Types: Release Notes
    Added Reference Type Snyk: https://github.com/sidorares/node-mysql2/releases/tag/v3.9.4 Types: Release Notes
    Added Reference Type CVE: https://security.snyk.io/vuln/SNYK-JS-MYSQL2-6591084 Types: Exploit, Third Party Advisory
    Added Reference Type Snyk: https://security.snyk.io/vuln/SNYK-JS-MYSQL2-6591084 Types: Exploit, Third Party Advisory
  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference https://blog.slonser.info/posts/mysql2-attacker-configuration/
    Added Reference https://github.com/sidorares/node-mysql2/blob/fd3d117da82cc5c5fa5a3701d7b33ca77691bc61/lib/parsers/text_parser.js%23L134
    Added Reference https://github.com/sidorares/node-mysql2/commit/4a964a3910a4b8de008696c554ab1b492e9b4691
    Added Reference https://github.com/sidorares/node-mysql2/pull/2574
    Added Reference https://github.com/sidorares/node-mysql2/releases/tag/v3.9.4
    Added Reference https://security.snyk.io/vuln/SNYK-JS-MYSQL2-6591084
  • CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0

    Aug. 22, 2024

    Action Type Old Value New Value
    Added CWE CISA-ADP CWE-1321
  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • CVE Received by [email protected]

    Apr. 10, 2024

    Action Type Old Value New Value
    Added Description Versions of the package mysql2 before 3.9.4 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.
    Added Reference Snyk https://security.snyk.io/vuln/SNYK-JS-MYSQL2-6591084 [No types assigned]
    Added Reference Snyk https://blog.slonser.info/posts/mysql2-attacker-configuration/ [No types assigned]
    Added Reference Snyk https://github.com/sidorares/node-mysql2/blob/fd3d117da82cc5c5fa5a3701d7b33ca77691bc61/lib/parsers/text_parser.js%23L134 [No types assigned]
    Added Reference Snyk https://github.com/sidorares/node-mysql2/commit/4a964a3910a4b8de008696c554ab1b492e9b4691 [No types assigned]
    Added Reference Snyk https://github.com/sidorares/node-mysql2/pull/2574 [No types assigned]
    Added Reference Snyk https://github.com/sidorares/node-mysql2/releases/tag/v3.9.4 [No types assigned]
    Added CWE Snyk CWE-1321
    Added CVSS V3.1 Snyk AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2024-21509 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability
© cvefeed.io
Latest DB Update: Jun. 18, 2025 7:24