CVE-2021-2390 Overview
CVE-2021-2390 is an Integer Underflow vulnerability in the MySQL Server product of Oracle MySQL, specifically affecting the InnoDB storage engine component. This vulnerability allows an unauthenticated attacker with network access via multiple protocols to compromise MySQL Server, potentially causing a complete denial of service through a hang or frequently repeatable crash.
Critical Impact
Successful exploitation enables unauthenticated attackers to cause complete denial of service of MySQL Server instances, disrupting database availability and potentially affecting dependent applications and services.
Affected Products
- Oracle MySQL Server versions 5.7.34 and prior
- Oracle MySQL Server versions 8.0.25 and prior
- NetApp OnCommand Insight
Discovery Timeline
- July 21, 2021 - CVE-2021-2390 published to NVD
- November 21, 2024 - Last updated in NVD database
Technical Details for CVE-2021-2390
Vulnerability Analysis
This vulnerability resides in the InnoDB storage engine, MySQL's default and most widely used transactional storage engine. The flaw is classified as CWE-191 (Integer Underflow), indicating that arithmetic operations on integer values can result in values wrapping below their minimum bounds. While the vulnerability requires specific conditions to exploit (reflected in its difficulty rating), it does not require any authentication, making it accessible to any attacker with network connectivity to the MySQL server.
The attack can be conducted via multiple protocols, providing flexibility for attackers in how they approach the target. When successfully exploited, the vulnerability causes the MySQL Server to either hang indefinitely or crash repeatedly, resulting in a complete denial of service condition that impacts database availability.
Root Cause
The root cause is an Integer Underflow condition (CWE-191) within the InnoDB component of MySQL Server. Integer underflow occurs when an arithmetic operation attempts to store a value smaller than the minimum value the integer type can hold, causing the value to wrap around to a large positive number. In the context of InnoDB, this arithmetic error in memory handling or index operations can trigger memory corruption or invalid state conditions that lead to server instability.
Attack Vector
The attack vector is network-based, allowing remote unauthenticated attackers to target vulnerable MySQL Server instances. The exploitation requires specific conditions to be met, making it difficult to exploit reliably. However, once successful, the attacker can cause:
- Complete server hangs requiring manual intervention
- Frequently repeatable crashes leading to sustained denial of service
- Disruption of all database operations and dependent applications
The vulnerability can be exploited through standard MySQL network protocols without requiring valid credentials, though the complexity of triggering the underflow condition provides some natural mitigation against opportunistic attacks.
Detection Methods for CVE-2021-2390
Indicators of Compromise
- Unexpected MySQL Server crashes or hangs without apparent cause
- Repeated mysqld process restarts in system logs
- Abnormal network traffic patterns targeting MySQL ports (typically 3306)
- Error logs showing InnoDB-related crashes or memory issues
Detection Strategies
- Monitor MySQL Server error logs for InnoDB crash signatures and unexpected restarts
- Implement network intrusion detection rules for anomalous MySQL protocol traffic
- Deploy database activity monitoring to identify unusual connection patterns from unauthenticated sources
- Configure alerting for MySQL service availability degradation
Monitoring Recommendations
- Enable comprehensive MySQL error logging with InnoDB-specific diagnostic options
- Implement automated health checks for MySQL Server availability and responsiveness
- Monitor system resource utilization for signs of denial of service conditions
- Set up alerting thresholds for connection failures and server restart events
How to Mitigate CVE-2021-2390
Immediate Actions Required
- Upgrade MySQL Server to version 8.0.26 or later, or 5.7.35 or later
- Review network access controls to limit MySQL Server exposure
- Implement firewall rules to restrict MySQL port access to trusted sources only
- Monitor MySQL Server logs for signs of exploitation attempts
Patch Information
Oracle has addressed this vulnerability in their July 2021 Critical Patch Update (CPU). Administrators should apply the security patches available through the Oracle Security Alert - July 2021 CPU. NetApp users should also consult the NetApp Security Advisory for guidance on affected OnCommand Insight deployments. Additional technical details are available through the Zero Day Initiative Advisory ZDI-21-881.
Workarounds
- Implement network segmentation to isolate MySQL servers from untrusted networks
- Configure firewall rules to restrict MySQL port (3306) access to authorized hosts only
- Enable connection rate limiting to reduce the impact of potential DoS attempts
- Deploy a reverse proxy or load balancer with connection filtering capabilities
# Example firewall configuration to restrict MySQL access
# Allow MySQL connections only from trusted application servers
iptables -A INPUT -p tcp --dport 3306 -s 10.0.0.0/24 -j ACCEPT
iptables -A INPUT -p tcp --dport 3306 -j DROP
# Verify MySQL Server version to confirm patch status
mysql --version
# Ensure version is 8.0.26+ or 5.7.35+
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

