Skip to content
Fencer Vulns
high 8.2

CVE-2024-21512 json

mysql2 vulnerable to Prototype Pollution

published 2024-05-29 2 y ago modified 2026-09-10 1 mo ago also EUVD-2024-1718 , GHSA-pmh2-wpjm-fj45

cvss
8.2
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
3.1%
EPSS 3.1% chance of exploitation in 30 days, percentile 87%
public exploits
0
none known

Summary

Versions of the package mysql2 before 3.9.8 are vulnerable to Prototype Pollution due to improper user input sanitization passed to fields and tables when using nestTables.

Patch / fix

  • npm mysql2 3.9.8
  • n/a mysql2 3.9.8
  • mysql2 mysql2 3.9.8

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2024-21512 updated cvss 8.2

mysql2: vulnerable to Prototype Pollution due to improper user input sanitization

  • Red Hat Developer Hub 1 rhdh/rhdh-hub-rhel9, rhdh-operator-container
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
Proof of concept is public
Automatable
yes
Technical impact
partial
Assessed
2 y ago

Exploit prediction

3.14% chance of exploitation in the next 30 days, higher than 87% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 8.2 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L/E:P
GitHub 3.1 8.2 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L
CNA 3.1 8.2 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L

Affected packages

ecosystem package affected fixed in
npm mysql2
<3.9.8
3.9.8

Affected products

  • n/a mysql2
  • n/a org.webjars.npm:mysql2
  • mysql2 mysql2

Classification

Weakness
  • CWE-1321 Improperly Controlled Modification of Object Prototype Attributes

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.