CVE-2021-3779 — Vulnerability in ruby-mysql — CVE Details
Externally Controlled Reference to a Resource in Another Sphere in ruby-mysql
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (1.22%). Schedule for your next planned update.
Does your project use an affected ruby-mysql version?
Paste your Gemfile.lock to check it for CVE-2021-3779 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
A malicious actor can read arbitrary files from a client that uses ruby-mysql to communicate to a rogue MySQL server and issue database queries. In these cases, the server has the option to create a database reply using the LOAD DATA LOCAL statement, which instructs the client to provide additional data from a local file readable by the client (and not a "local" file on the server).
Advisory Timeline
- First published June 29, 2022 (1611 days ago).
- Last revised February 21, 2024 — 602 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
gem install ruby-mysql -v 2.10.0
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: RubyGems (1).
| Package | Fixed In |
|---|---|
| ruby-mysql RubyGems · Affected: 2.9.0, 2.9.1, 2.9.10, 2.9.11 (+11 more) | 2.10.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-610
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 6.5 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
References
Frequently Asked Questions
- What is CVE-2021-3779?
- Externally Controlled Reference to a Resource in Another Sphere in ruby-mysql. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 6.5/10).
- How do I check if my project is affected by CVE-2021-3779?
- CVE-2021-3779 affects ruby-mysql. It has a 1.2% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2021-3779 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is an above-median EPSS score — 68.6% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2026-128084MEDIUM
sqlite3-ruby: Possible SQL query truncation when a string is 4 GiB or larger
- CVE-2026-115472MEDIUM
Doorkeeper: When using public clients, any client can revoke any access token