CVE-2021-2471 — mysql-connector-java
MEDIUMCVE-2021-2471 is a medium-severity (CVSS 5.9) vulnerability in mysql:mysql-connector-java. 6 public exploit or proof-of-concept references are indexed, so weaponization risk is real. A fix is available for mysql:mysql-connector-java — see the affected versions and patch details below.
Incorrect Authorization in MySQL Connector Java
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2021-2471.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
mysql:mysql-connector-javaReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
Vulnerability in the MySQL Connectors product of Oracle MySQL (component: Connector/J). Supported versions that are affected are 8.0.26 and prior. Difficult to exploit vulnerability allows high privileged attacker with network access via multiple protocols to compromise MySQL Connectors. Successful attacks of this vulnerability can result in unauthorized access to critical data or complete access to all MySQL Connectors accessible data and unauthorized ability to cause a hang or frequently repeatable crash (complete DOS) of MySQL Connectors. CVSS 3.1 Base Score 5.9 (Confidentiality and Availability impacts). CVSS Vector: (CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:N/A:H).
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | mysql:mysql-connector-java | ≥ 8.0.0&&< 8.0.27 | 8.0.27mysql:mysql-connector-java:8.0.27 |
Affected Products
communications cloud native core consoleoraclecommunications cloud native core network slice selection functionoraclecommunications cloud native core policyoraclecommunications cloud native core security edge protection proxyoraclemysql connectorsoraclequarkusquarkusResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for mysql:mysql-connector-java, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update mysql:mysql-connector-java to 8.0.27 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-2471 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
In OpenShift Container Platform (OCP), the Presto component is part of the OCP Metering stack and it ships the vulnerable version of the MySQL Connector/J package. Since the release of OCP 4.6, the Metering product has been deprecated and is removed from OCP starting from 4.9 version [1], hence the affected component…
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat build of Quarkus 2.2.5 | mysql-connector-java | RHSA-2022:0589 |
| Red Hat Fuse 7.11 | mysql-connector-java | RHSA-2022:5532 |
| RHAF Camel-K 1.8 | mysql-connector-java | RHSA-2022:6407 |
| RHINT Camel-Q 2.2.1 | see advisory | RHSA-2022:1013 |
| RHPAM 7.13.0 async | mysql-connector-java | RHSA-2022:5903 |
Frequently Asked Questions
Is CVE-2021-2471 in your dependencies?
Find it across Maven, including transitive dependencies.