CVE-2024-21512
JavaScript vulnerability analysis and mitigation

Overview

CVE-2024-21512 affects mysql2 package versions before 3.9.8. The vulnerability was discovered on May 16, 2024, and disclosed on May 28, 2024. This security flaw is a Prototype Pollution vulnerability that occurs due to improper user input sanitization when handling fields and tables with the nestTables feature (Snyk JS).

Technical details

The vulnerability is classified as CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes) and has been assigned a CVSS v3.1 score of 8.2 (High). The security flaw specifically manifests when using the nestTables feature, where improper sanitization of user input passed to fields and tables can lead to prototype pollution attacks. The vulnerability allows attackers to manipulate JavaScript object prototype attributes (NVD, Snyk JS).

Impact

The vulnerability can lead to multiple severe consequences including denial of service through JavaScript exceptions, tampering with application source code, and potential remote code execution. The high CVSS score indicates significant potential impact on system integrity and availability (Snyk JS).

Exploitability

The vulnerability is remotely exploitable without requiring authentication or user interaction. A proof-of-concept exploit has been publicly disclosed demonstrating how an attacker can manipulate object prototypes through SQL queries using the nestTables feature (Security Online, GitHub Gist).

Mitigation and workarounds

The vulnerability has been patched in mysql2 version 3.9.8. Users are strongly recommended to upgrade to this version or later. The fix includes improved sanitization of fields and tables when using nestTables functionality (GitHub PR).

Community reactions

The vulnerability has garnered significant attention in the security community due to mysql2's widespread usage, with over 2 million monthly downloads. The security community reacted swiftly to the disclosure, with proof-of-concept code being shared and analyzed (Security Online).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-88062CRITICAL9.5
  • JavaScript logoJavaScript
  • omniroute
NoNoSep 10, 2026
CVE-2026-61534CRITICAL9.1
  • JavaScript logoJavaScript
  • yayson
NoYesSep 11, 2026
CVE-2026-59973HIGH8.5
  • JavaScript logoJavaScript
  • @frontmcp/adapters
NoYesSep 11, 2026
CVE-2026-59960HIGH7.5
  • JavaScript logoJavaScript
  • @argos-ci/core
NoYesSep 10, 2026
CVE-2026-59965HIGH7.1
  • JavaScript logoJavaScript
  • @jhb.software/payload-alt-text-plugin
NoNoSep 10, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management