CVE-2021-3779
Ruby-MySQL Gem Client File Read
A malicious MySQL server can request local file content from a client using ruby-mysql prior to version 2.10.0 without explicit authorization from the user. This issue was resolved in version 2.10.0 and later.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
6.5
A malicious MySQL server can request local file content from a client using ruby-mysql prior to version 2.10.0 without explicit authorization from the user. This issue was resolved in version 2.10.0 and later.
- Record
CVE-2021-3779- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N - CVSS 2.0
- 4.3 Medium
AV:N/AC:M/Au:N/C:P/I:N/A:N - Weakness
- CWE-610
- Updated
- 2026-11-02
CVE List No score
Ruby-MySQL Gem Client File Read
A malicious MySQL server can request local file content from a client using ruby-mysql prior to version 2.10.0 without explicit authorization from the user. This issue was resolved in version 2.10.0 and later.
- Record
CVE-2021-3779- Weakness
- CWE-610
- Updated
- 2026-11-02
EUVDEUVD-2022-5970 No score
A malicious MySQL server can request local file content from a client using ruby-mysql prior to version 2.10.0 without explicit authorization from the user. This issue was resolved in version 2.10.0 and later.
- Record
EUVD-2022-5970- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-73pr-g6jj-5hc9
6.5
Externally Controlled Reference to a Resource in Another Sphere in ruby-mysql
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).
- Record
GHSA-73pr-g6jj-5hc9- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N - Weakness
- CWE-610
- Updated
- 2026-11-02
OSVGHSA-73pr-g6jj-5hc9
6.5
Externally Controlled Reference to a Resource in Another Sphere in ruby-mysql
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).
- Record
GHSA-73pr-g6jj-5hc9- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N - Weakness
- CWE-610
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-3779
6.5
A malicious MySQL server can request local file content from a client using ruby-mysql prior to version 2.10.0 without explicit authorization from the user. This issue was resolved in version 2.10.0 and later.
- Record
UBUNTU-CVE-2021-3779- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
ruby-mysqlRubyGems |
before 2.10.0 | 2.10.0 |
ruby-mysqlRubyGems |
before 2.10.0, plus listed versions 2.9.02.9.12.9.102.9.112.9.12 Show 10 moreShow less2.9.132.9.142.9.22.9.32.9.42.9.52.9.62.9.72.9.82.9.9 |
2.10.0 |
ruby-mysqlUbuntu:16.04:LTS |
All versions, plus listed versions 2.9.1-1build22.9.1-1build32.9.1-1build42.9.1-1build52.9.1-1ubuntu1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases, published | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-3779 is a medium vulnerability (CVSS 6.5) in Ruby-mysql Project Ruby-mysql, published June 28, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.19%, the 68th percentile. Fixed in ruby-mysql 2.10.0.
References
rapid7.com/blog/post/2022/06/28/cve-2021-3779-ruby-mysql-gem-client-file-read-fixed
nvd.nist.gov/vuln/detail/CVE-2021-3779
github.com/rubysec/ruby-advisory-db/blob/master/gems/ruby-mysql/CVE-2021-3779.yml
github.com/advisories/GHSA-73pr-g6jj-5hc9
github.com/tmtm/ruby-mysql
ubuntu.com/security/CVE-2021-3779
cve.org/CVERecord?id=CVE-2021-3779