CVE-2021-31810: An issue was discovered in Ruby through 2.6.7, 2.7.x through 2.7.3, and 3.x through 3.0.1.
Medium CVSS 5.8
- CVE id
- CVE-2021-31810
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| Ruby Runtimes and servers |
<= 2.6.7 >= 2.7.0, <= 2.7.3 >= 3.0.0, <= 3.0.1 |
after 2.6.7, 2.7.3, 3.0.1 |
How to fix it
Upgrade Ruby to a release newer than the last affected update of the line you run (2.6.7, 2.7.3, 3.0.1).
ruby --version
- Install the patched Ruby release of your minor line (rbenv, the ruby image tag) and update .ruby-version.
A free AIssue account reads the runtime versions your repositories pin (version files, Dockerfiles, build files) and tells you when one is affected.
Details
An issue was discovered in Ruby through 2.6.7, 2.7.x through 2.7.3, and 3.x through 3.0.1. A malicious FTP server can use the PASV response to trick Net::FTP into connecting back to a given IP address and port. This potentially makes curl extract information about services that are otherwise private and not disclosed (e.g., the attacker can conduct port scans and service banner extractions).
References
- CVE-2021-31810 on the NVD
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2021-31810
- Web: https://hackerone.com/reports/1145454
- Web: https://lists.debian.org/debian-lts-announce/2021/10/msg00009.html
- Web: https://lists.debian.org/debian-lts-announce/2023/04/msg00033.html
- Web: https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MWXHK5UUHVSHF7HTHMX6JY3WXDVNIHSL/
- Web: https://security.gentoo.org/glsa/202401-27
- Web: https://security.netapp.com/advisory/ntap-20210917-0001/
- Web: https://www.oracle.com/security-alerts/cpuapr2022.html
- Web: https://www.ruby-lang.org/en/news/2021/07/07/trusting-pasv-responses-in-net-ftp/
- Web: https://hackerone.com/reports/1145454
- Web: https://lists.debian.org/debian-lts-announce/2021/10/msg00009.html
- Web: https://lists.debian.org/debian-lts-announce/2023/04/msg00033.html
- Web: https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MWXHK5UUHVSHF7HTHMX6JY3WXDVNIHSL/
- Web: https://security.gentoo.org/glsa/202401-27
- Web: https://security.netapp.com/advisory/ntap-20210917-0001/
- Web: https://www.oracle.com/security-alerts/cpuapr2022.html
- Web: https://www.ruby-lang.org/en/news/2021/07/07/trusting-pasv-responses-in-net-ftp/
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: National Vulnerability Database (NVD) (public domain). Severity comes from the advisory's own rating when it has one, else from its CVSS score.