CVE-2021-31810
CVSS v3
5.8
MEDIUM
EPSS Score
3.0 %
exploit probability, as of 2026-10-18
CISA KEV
No
known exploited
Exploitation
—
SSVC status
Get an alert for each new CVE published for ruby.
Affected and fixed versions
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- rubyBitnamiall versions · fixed in 2.6.8and 1 other package
- rubyAlmaLinux:8all versions · fixed in 2.5.9-109.module_el8.5.0+259+8cec6917and 3 other packages
- ruby-default-gemsAlmaLinux:8all versions · fixed in 2.7.4-137.module_el8.4.0+2515+f744ca41
- ruby-irbAlmaLinux:8all versions · fixed in 2.5.9-109.module_el8.5.0+2627+d9c243ca
- rubygem-abrtAlmaLinux:8all versions · fixed in 0.3.0-4.module_el8.5.0+2623+08a8ba32
- rubygem-abrt-docAlmaLinux:8all versions · fixed in 0.3.0-4.module_el8.5.0+2625+ec418553
- rubygem-bigdecimalAlmaLinux:8all versions · fixed in 1.3.4-109.module_el8.5.0+259+8cec6917
- rubygem-bsonAlmaLinux:8all versions · fixed in 4.3.0-2.module_el8.5.0+259+8cec6917
21 more package ranges on OSV.dev
Vendor advisories
ruby: FTP PASV command response can cause Net::FTP to connect to arbitrary host
ruby as a component of Red Hat Enterprise Linux 6 · ruby-devel as a component of Red Hat Enterprise Linux 6 · ruby-docs as a component of Red Hat Enterprise Linux 6
Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update
Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update
Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update
Red Hat Security Advisory: rh-ruby26-ruby security, bug fix, and enhancement update
Red Hat Security Advisory: ruby:2.5 security update
7 more advisories
Description
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).
Technical details
- Published
- 2021-07-13
Frequently asked questions
What is CVE-2021-31810?
Is CVE-2021-31810 actively exploited?
What is the CVSS score for CVE-2021-31810?
Running ruby? Hear about its next vulnerability
CVE Watch matches each new CVE to the vendors and products you list (vendor and product, not the version) and puts it in your alerts with its KEV and EPSS status.
Already have an account? Open CVE WatchNo credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? CVE Watch alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.