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 references exist, 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
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
CVE-2021-2471 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 377,166 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
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 |
Research 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
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2021-2471 can be triaged on real exposure rather than presence alone.
Tailored to CVE-2021-2471. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
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?
O3 Security finds CVE-2021-2471 across Maven dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.